- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
I have a lsp routine that was created by Jeff Mishler and modified by Ian McClain that I need to be able to use on C3D 2021 and above. I have no clue how to modify it to accept all versions.
Thanks,
Mike McCulley
;|Command to globally change the MarkerDisplay and MarkerLabel color to BYLAYER
to be used for all point styles.
Created 8/4/2014 by Jeff Mishler of Quux Software
Modified 6/5/2018 by Ian McClain of Stantec Consulting
|;
(defun c:PointLabelsBylayer
(/ *acad* c3d c3ddoc enum prod prodstr siztyp)
(vl-load-com)
(setq prod (vlax-product-key))
(setq prodStr (strcat "AeccXUiLand.AeccApplication"
(cond ((vl-string-search "\\R17.0\\" prod)
".4.0"
)
;;2007
((vl-string-search "\\R17.1\\" prod)
".5.0"
)
;;2008
((vl-string-search "\\R17.2\\" prod)
".6.0"
)
;;2009
((vl-string-search "\\R18.0\\" prod)
".7.0"
)
;;2010
((vl-string-search "\\R18.1\\" prod)
".8.0"
)
;;2011
((vl-string-search "\\R18.2\\" prod)
".9.0"
)
;;2012
((vl-string-search "\\R19.0\\" prod)
".10.0"
)
;;2013
((vl-string-search "\\R19.1\\" prod)
".10.3"
)
;;2014
((vl-string-search "\\R20.0\\" prod)
".10.4"
)
;;2015
(t "")
)
)
)
(and (setq *acad* (vlax-get-acad-object))
(setq C3D (vla-getinterfaceobject *acad* prodStr))
(setq C3Ddoc (vla-get-activedocument C3D))
)
(progn
(vlax-for styl (vlax-get c3ddoc 'PointStyles)
(vlax-put-property (vlax-get styl 'markerdisplaystyleplan) 'color "BYLAYER")
(vlax-put-property (vlax-get styl 'labeldisplaystyleplan) 'color "BYLAYER")
(vlax-put-property (vlax-get styl 'markerdisplaystylemodel) 'color "BYLAYER")
(vlax-put-property (vlax-get styl 'labeldisplaystylemodel) 'color "BYLAYER")
(vlax-put-property (vlax-get styl 'markerdisplaystyleprofile) 'color "BYLAYER")
(vlax-put-property (vlax-get styl 'markerdisplaystylesection) 'color "BYLAYER")
)
(princ "\nAll point styles updated!")
)
(princ)
)
Solved! Go to Solution.