Sam Jones Posted June 16, 2021 Share Posted June 16, 2021 I want to get a handle to a selected object that is inside a group. In particular, I want to get this handle while I am inside the group editing it. Actually it is inside a group that is inside a group. I know that the group is the parent to the selected object, but there does not seem to be a way to get a handle to a selected object while editing that object inside the group. FSActLayer returns the handle to the highest level group that contains the object being edited. Actually, I'm not so much editing it as collecting data about it which is why I need its handle. Anybody have a neat little trick to get a handle to selected object inside a group that is inside a group. I am, of course, in group edit mode. Quote Link to comment
Julian Carr Posted June 16, 2021 Share Posted June 16, 2021 If you get a handle to the parent, then use FInGroup() and NextObj() to cycle through the objects in the group, then use Selected(), it might work. An alternative would be to use FInGroup(), check the first object is not selected using Selected(), then jump straight to the selected object using NextSObj(). All just a guess mind you. Quote Link to comment
JBenghiat Posted June 16, 2021 Share Posted June 16, 2021 I think where's waldo is still the best method: locus(0,0); waldo:=LNewObj; objH:=PrevSObj(waldo); delObject(waldo); 1 Quote Link to comment
Sam Jones Posted June 16, 2021 Author Share Posted June 16, 2021 Thank you Josh! I've used waldo before, and I'm embarrassed that I did not think of it, but it is a different application from my previous ones. The use of "PrevSObj()" is fabulous, very scalable and applicable for the vast majority of my needs. Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.