Community
Civil 3D Customization
Welcome to Autodesk’s AutoCAD Civil 3D Forums. Share your knowledge, ask questions, and explore popular AutoCAD Civil 3D Customization topics.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Command to rotate General Note Label

20 REPLIES 20
SOLVED
Reply
Message 1 of 21
htls69
1417 Views, 20 Replies

Command to rotate General Note Label

Trying to create a lsp command that will rotate a general note label

 

we have one that rotates Points ie z1, z2, z3, z4 That rotates the point to the respective quadrant

 

That lisp is below

 

;;; point rotation quadrant 1
(defun c:Z1 (/ doc pt sourcept ss ss2)
(setq rlang (- (* pi 0.25) (getvar "viewtwist")))
  (vl-load-com)
  (setq doc (vla-get-activedocument (vlax-get-acad-object)))
  (vla-startundomark doc)
    (princ "\n....select Points to change: ")
    (if (setq ss (ssget '((0 . "AECC_COGO_POINT"))))
	(while (> (sslength ss) 0)
	  (setq pt (vlax-ename->vla-object (ssname ss 0)))
	  (vlax-put pt 'labelrotation rlang)
	  (ssdel (ssname ss 0) ss)
	)
      )
    )
  )
  (vla-endundomark doc)
  (princ)
)

If someone could help me that would be awesome.

 

I would like to have 4 lsp routines Like-- L1, L2, ,L3, L4 

Allen Robberson
Credit where credit is due! Give kudos or accept as solution whenever you can.
20 REPLIES 20
Message 21 of 21
htls69
in reply to: Jeff_M

Thanks the change to the lisp routine fixed it
Allen Robberson
Credit where credit is due! Give kudos or accept as solution whenever you can.

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Rail Community


 

Autodesk Design & Make Report