Please lisp code requaired

Please lisp code requaired

iftikhargulmrd
Enthusiast Enthusiast
939 Views
5 Replies
Message 1 of 6

Please lisp code requaired

iftikhargulmrd
Enthusiast
Enthusiast

hey all I want code for chainage marking  lisp instead of interval to ask me for each distance one by one

 

regards

 

0 Likes
Accepted solutions (2)
940 Views
5 Replies
Replies (5)
Message 2 of 6

dbhunia
Advisor
Advisor
Accepted solution

Try with this.......

 

(defun c:ChainageMark()
    (setq Pl1Name (car (entsel "\nPick Centerline "))
          MarkLength (getreal "\nEnter Tick Length ")
	  CurrStation 0
          MaxLength (vlax-curve-getDistAtPoint Pl1Name (vlax-curve-getEndPoint Pl1Name))
          currLayer (getvar "CLAYER") ; change as needed
    );setq
    (while (and (setq StaInterval (getreal "\nEnter Chainage Interval "))
		(< (setq CurrStation (+ CurrStation StaInterval)) MaxLength)
           )
          (setq currPoint (vlax-curve-getPointAtDist Pl1Name currStation)
		currParam (vlax-curve-getParamAtDist Pl1Name currStation)
		PerpAng (dkb_getPerp Pl1Name currParam 1)
		Pt1 (polar currPoint PerpAng (* MarkLength 0.5))
		Pt2 (polar currPoint PerpAng (* MarkLength -0.5))
		LineList (list
                          '(0 . "LINE")
                          '(100 . "AcDbEntity")
                          '(100 . "AcDbLine")
                          (cons 8 currLayer)
                          (cons 10 Pt1)
                          (cons 11 Pt2)
			);list
         );setq
         (entmake LineList)
    );while
)

 


Debashis Bhunia
Co-Founder of Geometrifying Trigonometry(C)
________________________________________________
Walking is the First step of Running, Technique comes Next....
0 Likes
Message 3 of 6

iftikhargulmrd
Enthusiast
Enthusiast

thanks a lot brother as always you are the first one

 

 

0 Likes
Message 4 of 6

iftikhargulmrd
Enthusiast
Enthusiast

sir

can please check the error in lisp 

 

 

; error: no function definition: DKB_GETPERP

0 Likes
Message 5 of 6

dbhunia
Advisor
Advisor
Accepted solution

The message indicates that the function "dkb_getPerp" is not loaded......

 

You have to load 3 LISP, to run the command.....

 

Did you loaded all 3 LISP........

 

Load all ..... then try 

 

 

 


Debashis Bhunia
Co-Founder of Geometrifying Trigonometry(C)
________________________________________________
Walking is the First step of Running, Technique comes Next....
0 Likes
Message 6 of 6

iftikhargulmrd
Enthusiast
Enthusiast

thanks a lot 

yes it was same issue 

 

Best Regards

0 Likes