SteveK Posted September 17, 2009 Posted September 17, 2009 Sorry I'm sure I've seen this question asked before, but now that I want to know it I can't find it. The question is: if I have a nested object, what is the best way to get the block object that it is within? thanks! Quote
Lee Mac Posted September 17, 2009 Posted September 17, 2009 Hi Steve, Try this: (vla-ObjectIdtoObject (vla-get-ActiveDocument (vlax-get-acad-object)) (vla-get-OwnerId Obj)) Quote
SteveK Posted September 17, 2009 Author Posted September 17, 2009 Thanks! Ahh I knew it was that easy. Quote
Lee Mac Posted September 17, 2009 Posted September 17, 2009 Also, if using nentselp to get the nested item, look at the last element in the list, after the transformation matrix :wink: Quote
SteveK Posted September 17, 2009 Author Posted September 17, 2009 I don't get that bit of nentselp; I use nentsel heaps, but have yet the need to use nentselp with a predetermined point, and when I try it anyway it just returns a similar output to nentsel, ie no matrix. (which is fine at the moment cause I've yet to find a need for it) Quote
Lee Mac Posted September 17, 2009 Posted September 17, 2009 You use it a hell of a lot in GrRead loops :wink: -- it will only return the transformation matrix on nested objects :wink: Quote
SteveK Posted September 17, 2009 Author Posted September 17, 2009 Yeah I learnt a lot from your usage of grread in Inc Num Suite - until I went through it I always thought you just got the text to attach itself to the crosshairs somehow. Ahh I see the matrix now. I was only clicking attributes! Quote
Lee Mac Posted September 17, 2009 Posted September 17, 2009 Yeah I learnt a lot from your usage of grread in Inc Num Suite - until I went through it I always thought you just got the text to attach itself to the crosshairs somehow. Ahh I see the matrix now. I was only clicking attributes! Hehe, glad I could be of service to your learning Quote
haz wang Posted September 26, 2009 Posted September 26, 2009 just wondering if it is possible to do this with VBA? how? Quote
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.