JonathanP Posted September 3, 2009 Posted September 3, 2009 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... Quote
NBC Posted September 3, 2009 Posted September 3, 2009 Why not just add an alignment parameter to your blocks ? Quote
JonathanP Posted September 3, 2009 Author Posted September 3, 2009 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. Quote
SEANT Posted September 3, 2009 Posted September 3, 2009 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 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.