Jump to content

Recommended Posts

Posted

I made a VBA program to insert blocks. The user has to select the insertion point and rotate the block. What I would actually like to do is to insert the blocks aligned to a selected line, just as the alignment parameter in dynamic blocks would do...

Posted

Why not just add an alignment parameter to your blocks ?

Posted

Because the program creates the blocks first with user defined properties. If I would have to create the blocks myself it would take me ages. It's hundreds of them.

Posted

If the active UCS is always parallel to the WCS then it would be a matter setting Insert.Rotation equal to the angle returned by Thisdrawing.Utility. AngleFromXAxis(Line.StartPoint, Line.EndPoint)

 

It is a bit more complicated when working with a full 3D environment. In that case some coordinate transformations would be required. See (towards the bottom):

http://discussion.autodesk.com/forums/thread.jspa?messageID=5825469

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...