Page tree
Skip to end of metadata
Go to start of metadata

Use Case

You have attributes (properties) in your CAD file which contain the description of your part in different languages. During import-on-demand you want to map those CAD file properties to the language dependent Document Info Record description.

Configuration

The example is shown for Solidworks, but works similar for other CAD systems. Replace SLW by your application.

<ECTR installation>\applications\slw\customize\config\attributes-to-sap.xml
<?xml version="1.0" encoding="ISO-8859-1"?>
<mapping>
  <section name="my_attrib_section" description="mapping during IoD">  
    <DIR field="SAP_DESCRIPTION" language="DE" >
      <APPL_ATTRIBUTE name="SAP_DOCTEXT_DE" />
    </DIR>
    <DIR field="SAP_DESCRIPTION" language="EN" >
      <APPL_ATTRIBUTE name="SAP_DOCTEXT_EN" />
    </DIR>
  </section>
...
</mapping>

If you want to map a specific value also into Import-On-Demand dialog you have an additional mapping, see line 10-12

<ECTR installation>\applications\slw\customize\config\attributes-to-sap.xml
<?xml version="1.0" encoding="ISO-8859-1"?>
<mapping>
  <section name="my_attrib_section" description="mapping during IoD">  
    <DIR field="SAP_DESCRIPTION" language="DE" >
      <APPL_ATTRIBUTE name="SAP_DOCTEXT_DE" />
    </DIR>
    <DIR field="SAP_DESCRIPTION" language="EN" >
      <APPL_ATTRIBUTE name="SAP_DOCTEXT_EN" />
    </DIR>
    <APPL_ATTRIBUTE name="_DOCDESCR" >
      <APPL_ATTRIBUTE name="SAP_DOCTEXT_EN" />
    </APPL_ATTRIBUTE >
  </section>
...
</mapping>

... and here is the result in the Import-On-Demand UI:

<ECTR installation>\applications\slw\customize\config\default.txt
# -----------------------------------------------------------------------------
# If you use an attribute_section for <document_create/> you have to set this option.
# Default value is false.
# -----------------------------------------------------------------------------
plm.options.importOnDemand.TransferAttributesToSAP.SLW = true
# -----------------------------------------------------------------------------

You need to define an "attribute_section" in your dtype definition. The section name "my_attrib_section" refers to the section name defined in attributes-to-sap.xml, see above.

<ECTR Installation>\applications\slw\customize\config\dtype.xml
...
         <document_create      ...
                               attribute_section="my_attrib_section"
                               ...>
         </document_create>
...

 

(warning) Attention: if you have mapping in attributes-from-sap.xml which defines the mapping SAP to CAD, then values are empty. Mapping can also be derived in <ECTR installation>\customize\config\attributes-from-sap.xml via the include_section="default"

<ECTR installation>\applications\slw\customize\config\attributes-from-sap.xml
<?xml version="1.0" encoding="ISO-8859-1"?>
<mapping>
  <section name="SLWMDL" include_section="default" description="Mapping from SAP to SOLIDWORKS 3D">
...
  • No labels