Cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted

How to configure the SolidWorks integration to save JT files for non-standard Default configurations

Siemens Valued Contributor Siemens Valued Contributor
Siemens Valued Contributor

Recently I was asked by a customer about saving JT files for weldment parts, in which SolidWorks replaces the usual Default configuration with its own Default<As Machined> configuration.  The Administration guide does state that the file_name tag is available for use with the JT auxiliary file map, but does not provide a working example.

 

The weldment part scenario actually spans two configuration points, because (a) the integration must be informed that Default<As Machined> is a valid master configuration, and (b) the integration must be aware that the JT translator will generate a JT file with a compound and sanitized file name.

 

The first requirement is easily handled by adding Default<As Machined> to the sw.configurations.masters preference, in swim.properties:

 

sw.configurations.masters=Default\:Default<as Machined>

 

The second requirement calls for special configuration of the JT file map, in swim.xml.  In the OOTB client installation, it is condensed to this:

 

<jt_file action="translate" cad_type="sldprt:sldtbx" eai_dir="C:\apps\swjt"/>

 

which only works when the JT file name (minus extension) exactly matches the name of the CAD model being translated.    In the case of a weldment part, the JT file is both extended to include the name of the .sldprt or .sldasm file, and it is santized to remove the < and > characters, which, interestingly, are used by SolidWorks, which runs only on Windows, but are not accepted by Windows as legal file name characters.  For example, given a weldment part that looks like this in SolidWorks:

 

2019-01-02 14_18_30-SOLIDWORKS Professional 2018 x64 Edition - [003465.sldprt [Read-only]].png

the JT translator will write a file like this to disk:

 

2019-01-02 14_18_30-SOLIDWORKS Professional 2018 x64 Edition - [003465.sldprt [Read-only]].png

This JT file does not even come close to matching the CAD model name, and so the integration cannot recognize and save it to Teamcenter, without additional configuration.

 

The solution is to add a 2nd JT file map, with a file name pattern, while preserving the OOTB map that handles non-weldment default configurations.  The required entries look like this:

 

2019-01-02 14_18_30-SOLIDWORKS Professional 2018 x64 Edition - [003465.sldprt [Read-only]].png

The first map handles JT files with a standard Default configuration, while the second map is specific to weldment parts that have a Default<As Machined> configuration.  Other non-standard master configurations can be managed with additional JT auxiliary file maps.

 

 

 

 

1 REPLY 1

Re: How to configure the SolidWorks integration to save JT files for non-standard Default configurat

Pioneer
Pioneer
may be you hav't a definition to write this parameter to the database ?

Do these parameters affect this?

{ Dataset type="SWDrw"
Description : Item.object_name
Revision : ItemRevision.item_revision_id
%txd1%Description : ItemRevision.object_name
}

{ Dataset type="SW2Tbx"
Description : Item.object_name
Revision : ItemRevision.item_revision_id
%txd1%Description : ItemRevision.object_name
}

{ Dataset type="SWPrt"
Description : Item.object_name
Revision : ItemRevision.item_revision_id
%txd1%Description : ItemRevision.object_name
}

{ Dataset type="SWAsm"
Description : Item.object_name
Revision : ItemRevision.item_revision_id
%txd1%Description : ItemRevision.object_name
}

or it


<attribute_map cad_type="slddrw:sldasm:sldprt:sldtbx">
<attribute>
<cad_name value="Description"/>
<pdm_name value="item_name"/>
<direction value="cadtopdm"/>
</attribute>
<attribute>
<cad_name value="Description"/>
<pdm_name value="ItemRevision.object_name"/>
<direction value="both"/>
</attribute>
<attribute>
<cad_name value="Revision"/>
<pdm_name value="item_revision_id"/>
<direction value="pdmtocad"/>
</attribute>
</attribute_map>