Apart from the SComp.FromSel() method, is there any way to manipulate the current selection from script?
What I am trying to achieve is a way to start a routine with multiple selected meshes, then remove each one from the selection after it is processed
The reason is that I wish for the selection color to be replaced by the real color after each loop
Manipulate current selection from script
- gilles_3DR
- V.I.P Member
- Posts: 235
- Joined: Mon Dec 08, 2014 11:41 am
- 9
- Full Name: Gilles Monnier
- Company Details: Hexagon
- Company Position Title: 3DR Technical Manager
- Country: France
- Linkedin Profile: Yes
- Has thanked: 2 times
- Been thanked: 28 times
Re: Manipulate current selection from script
Hi,
I think I see what you mean. You would like a function that removes the component from the selection so that it is displayed with the assigned color and not the selection color in order to better "see" what you do.
I will tell the team to add a set of functions for a SComp: AddToSelection(), RemoveFromSelection() and IsSelected().
If you see some additional functions that would be handy when working with selections (or if these would not fit your needs), just let me know!
Meanwhile, I tested the following which did the trick:
1. Remove the component from the document: yourSComp.RemoveFromDoc()
2. Add the component to the document: yourSComp.AddToDoc()
This way, the component is not selected anymore and displayed with its real color.
Let me know if this works in your case
I think I see what you mean. You would like a function that removes the component from the selection so that it is displayed with the assigned color and not the selection color in order to better "see" what you do.
I will tell the team to add a set of functions for a SComp: AddToSelection(), RemoveFromSelection() and IsSelected().
If you see some additional functions that would be handy when working with selections (or if these would not fit your needs), just let me know!
Meanwhile, I tested the following which did the trick:
1. Remove the component from the document: yourSComp.RemoveFromDoc()
2. Add the component to the document: yourSComp.AddToDoc()
This way, the component is not selected anymore and displayed with its real color.
Let me know if this works in your case
-
- I have made <0 posts
- Posts: 4
- Joined: Tue Jul 28, 2020 1:50 am
- 3
- Full Name: Avanade Japan Data
- Company Details: Avanade Japan
- Company Position Title: Avanade Japan
- Country: Japan
- Has thanked: 3 times
Re: Manipulate current selection from script
Thanks Gilles
I will try to see if that works for me
Look forward to new features
c
I will try to see if that works for me
Look forward to new features
c