PaulS00 Posted August 24, 2016 Share Posted August 24, 2016 Hello, I have this LISP that matches C3D point properties, but doesn't include the point label rotation. As I was looking through the code, it seems that I could just add a line in, but I don't know what the specific "verbage" is. Thoughts? ;;; match point lable style (defun c:mst (/ doc labelstyle layr lblstyle newstyle obj obj2 pt ptdesc ptlayer ptstyle sourcept ss ss2) (vl-load-com) (setq doc (vla-get-activedocument (vlax-get-acad-object))) (vla-startundomark doc) (princ "\nSelect source point: ") (if (setq ss (ssget ":S" '((0 . "AECC_COGO_POINT")))) (progn (setq sourcePt (vlax-ename->vla-object (ssname ss 0))) (setq labelstyle (vlax-get sourcePt 'labelstyle)) (setq ptstyle (vlax-get sourcePt 'Style)) (setq ptdesc (vlax-get sourcePt 'rawdescription)) (setq ptlayer (vlax-get sourcePt 'layer)) (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 'labelstyle labelstyle) (vlax-put pt 'Style ptstyle) (vlax-put pt 'rawdescription ptdesc) (vlax-put pt 'layer ptlayer) (ssdel (ssname ss 0) ss) ) ) ) ) (vla-endundomark doc) (princ) ) Quote Link to comment Share on other sites More sharing options...
BIGAL Posted August 24, 2016 Share Posted August 24, 2016 I think this may be helpfull (vlax-put-property obj "Rotation" ang ) Quote Link to comment Share on other sites More sharing options...
broncos15 Posted August 25, 2016 Share Posted August 25, 2016 Using Visual LISP you can access most properties of objects (certain properties of pipe networks, profiles, etc. aren't accessible through LISP). You can access these functions via vlax-get-property, or the shortcut vla functions. For example (vlax-get-property obj 'Layer) or the shortcut function (vla-get-layer obj) . If the shortcut functions are available, it will turn blue in the Visual LISP Editor, type vlide at the command line to access. Quote Link to comment Share on other sites More sharing options...
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.