reselect a part in assembly

reselect a part in assembly

Anonymous
Not applicable
212 Views
2 Replies
Message 1 of 3

reselect a part in assembly

Anonymous
Not applicable
I am writing a little program whitch after selecting a part inside an assembly changes the material properties, iproperties and saves and replaces the part.
The selecting and changing the part works fine but after adding material properties to the part the part is deselected inside the assembly. How do I reselect the part or how do I know inside a new sub which part I am editing?

richard
0 Likes
213 Views
2 Replies
Replies (2)
Message 2 of 3

Anonymous
Not applicable
Many API operations will cause the current
selection to be cleared.  That's what you're seeing in this case.  If
you need to maintain the list of selected items you should store them
locally within your program before performing any operations that will
clear the selection.  If for some reason you want them to remain selected
after you've finished your operations, you can use the SelectSet object and
reselect them.

 

-Brian


style="PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px">
I
am writing a little program whitch after selecting a part inside an assembly
changes the material properties, iproperties and saves and replaces the part.

The selecting and changing the part works fine but after adding material
properties to the part the part is deselected inside the assembly. How do I
reselect the part or how do I know inside a new sub which part I am editing?

richard

0 Likes
Message 3 of 3

Anonymous
Not applicable
Indeed I want to maintain the selection after performing an API operation. I don't want to reselect the part manualy with the selectset object. Or can this be done by command also?
But how do I store the list of selected item, is there a unique i.d. of the part to know which part was selected?

richard
0 Likes