Jump to content

Recommended Posts

Posted

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!

Posted

Hi Steve,

 

Try this:

 

   (vla-ObjectIdtoObject
     (vla-get-ActiveDocument
       (vlax-get-acad-object))
         (vla-get-OwnerId Obj))

Posted

Also, if using nentselp to get the nested item, look at the last element in the list, after the transformation matrix :wink:

Posted

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)

Posted

You use it a hell of a lot in GrRead loops :wink: -- it will only return the transformation matrix on nested objects :wink:

Posted

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!

Posted
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 :)

  • 2 weeks later...
Posted

just wondering if it is possible to do this with VBA? how?

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.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...