top of page
Search
Writer's pictureIvaylo Fiziev

Getting part names in line simulation mode

Ever since we introduced the CREATE_PART_APPEARANCE/ DELETE_PART_APPEARANCE SCL functions, we had a problem - how to get the names of the parts in line simulation mode. Parts are not loaded in this mode so we cannot simply copy the name. What users can do it switch to standard mode, copy the part name and then switch back to line simulation mode. Pretty annoying, isn't it? Depending on the study size this procedure might take a considerable amount of time, inevitably killing your productivity. Recently (v2408) we have introduced a new data type in SCL that can actually help you with this task. The idea is simple: The user generates parts appearances (the old way) in line simulation mode (using the 'Generate Appearances' command). Then creates a variable of type TX_OBJECT in a SCL script. The SCL editor's UI allows you to pick an appearance as a default value of this variable. Once this is done the script gains access to the part name in the code by using the variable as a UDT.

Shortly said: TX_OBJECT allows you to reference study objects in the script. For now we utilize this reference to get the object's name. The object is referenced via its persistent id which allows the script to be reused after study reload. This is especially useful on Team Center where finding the names is even a bigger pain.

You can use this approach when referencing parts, resources and part appearances.

Entities are not supported in this version.

21 views0 comments

Comments

Rated 0 out of 5 stars.
No ratings yet

Add a rating
bottom of page