Selection Info Help

Selection Info Help

MitchPflederer
Advocate Advocate
726 Views
3 Replies
Message 1 of 4

Selection Info Help

MitchPflederer
Advocate
Advocate

Correct me if I'm wrong, PowerMill has a list of entities that are selected in the window, I'm not talking about the explorer, but in the window. there must be an object with lists of what is actively selected. line segments, toolpath segments, boundary segments, model surfaces, ect. otherwise how would it know what to delete when you "delete selected entities".

 

how do i access these objects or lists in a macro? 

 

for example; I want to know the index numbers of the selected boundary segments on my screen and do work with and to it like find its length and then delete lengths that differ.

 

 

0 Likes
727 Views
3 Replies
Replies (3)
Message 2 of 4

TK.421
Advisor
Advisor

Excellent question!


the numbers never lie
0 Likes
Message 3 of 4

icse
Advisor
Advisor

not a very nice solution but anyway:

 

this gives you an array of the 'components', selected parts '1' not selected parts '0'

 

 

 

 

FORM TPLIST
bool array $selectedParts[] = selected_list_rows('TPList.TPListView')

 

 

 

 

 

then you can select / delete / reorder them with commands like:

 

 

 

 

EDIT TPSELECT ; TPLIST UPDATE\r 3 NEW
EDIT TPSELECT ; TPLIST UPDATE\r 9 TOGGLE
EDIT TOOLPATH REORDER MOVE_DOWN
DELETE TOOLPATH ; SELECTED

 

 

 

 

 

you also can read the values from the columns and rows:

FORM TPLIST
string $value = list_cell_value('TPList.TPListView', 1, 1)

 

You can finde more in the documentaion: Functions / Widget Functions

0 Likes
Message 4 of 4

MitchPflederer
Advocate
Advocate

that's very helpful. but not exactly what I'm looking for I'm looking for the one level above that. but now I'm wondering if there is no separate objects list of things that are selected. 

0 Likes