Jump to content
rog1n

How control aligment of dynamic block with lisp

Recommended Posts

rog1n

Hello,  I need to select many dynamic blocks then select one polyline and all blocks aligment with this polyline using the tool "aligment of dynamic block". I found this lisp from lee-mac (http://lee-mac.com/objectalign.html) this do almost I need instead of specify the base I need the lisp use aligment. Can anyone help me or give me at least one direction how to do this.

 

 

Example.dwg

Edited by rog1n

Share this post


Link to post
Share on other sites
BIGAL

Have a look at chainage.lsp it uses the 1st derivate of the pline to work out the angle of points along a pline.

 

; obj is vl pline pnt is point on pline

(defun alg-ang (obj pnt)
  (angle '(0. 0. 0.)
     (vlax-curve-getfirstderiv
       obj
       (vlax-curve-getparamatpoint
         obj
         pnt
       )
     )
  )
)

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×