<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Modify lsp to be used for all versions in Civil 3D Customization Forum</title>
    <link>https://forums.autodesk.com/t5/civil-3d-customization-forum/modify-lsp-to-be-used-for-all-versions/m-p/10486086#M6452</link>
    <description>ByBlock = 0</description>
    <pubDate>Wed, 21 Jul 2021 20:14:04 GMT</pubDate>
    <dc:creator>Jeff_M</dc:creator>
    <dc:date>2021-07-21T20:14:04Z</dc:date>
    <item>
      <title>Modify lsp to be used for all versions</title>
      <link>https://forums.autodesk.com/t5/civil-3d-customization-forum/modify-lsp-to-be-used-for-all-versions/m-p/10479462#M6447</link>
      <description>&lt;P&gt;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.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Mike McCulley&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;;|Command to globally change the MarkerDisplay and MarkerLabel color to BYLAYER&lt;BR /&gt;to be used for all point styles.&lt;BR /&gt;Created 8/4/2014 by Jeff Mishler of Quux Software&lt;BR /&gt;Modified 6/5/2018 by Ian McClain of Stantec Consulting&lt;BR /&gt;|;&lt;BR /&gt;(defun c:PointLabelsBylayer&lt;BR /&gt;(/ *acad* c3d c3ddoc enum prod prodstr siztyp)&lt;BR /&gt;(vl-load-com)&lt;BR /&gt;(setq prod (vlax-product-key))&lt;BR /&gt;(setq prodStr (strcat "AeccXUiLand.AeccApplication"&lt;BR /&gt;(cond ((vl-string-search "\\R17.0\\" prod)&lt;BR /&gt;".4.0"&lt;BR /&gt;)&lt;BR /&gt;;;2007&lt;BR /&gt;((vl-string-search "\\R17.1\\" prod)&lt;BR /&gt;".5.0"&lt;BR /&gt;)&lt;BR /&gt;;;2008&lt;BR /&gt;((vl-string-search "\\R17.2\\" prod)&lt;BR /&gt;".6.0"&lt;BR /&gt;)&lt;BR /&gt;;;2009&lt;BR /&gt;((vl-string-search "\\R18.0\\" prod)&lt;BR /&gt;".7.0"&lt;BR /&gt;)&lt;BR /&gt;;;2010&lt;BR /&gt;((vl-string-search "\\R18.1\\" prod)&lt;BR /&gt;".8.0"&lt;BR /&gt;)&lt;BR /&gt;;;2011&lt;BR /&gt;((vl-string-search "\\R18.2\\" prod)&lt;BR /&gt;".9.0"&lt;BR /&gt;)&lt;BR /&gt;;;2012&lt;BR /&gt;((vl-string-search "\\R19.0\\" prod)&lt;BR /&gt;".10.0"&lt;BR /&gt;)&lt;BR /&gt;;;2013&lt;BR /&gt;((vl-string-search "\\R19.1\\" prod)&lt;BR /&gt;".10.3"&lt;BR /&gt;)&lt;BR /&gt;;;2014&lt;BR /&gt;((vl-string-search "\\R20.0\\" prod)&lt;BR /&gt;".10.4"&lt;BR /&gt;)&lt;BR /&gt;;;2015&lt;BR /&gt;(t "")&lt;BR /&gt;)&lt;BR /&gt;)&lt;BR /&gt;)&lt;BR /&gt;(and (setq *acad* (vlax-get-acad-object))&lt;BR /&gt;(setq C3D (vla-getinterfaceobject *acad* prodStr))&lt;BR /&gt;(setq C3Ddoc (vla-get-activedocument C3D))&lt;BR /&gt;)&lt;BR /&gt;&lt;BR /&gt;(progn&lt;BR /&gt;(vlax-for styl (vlax-get c3ddoc 'PointStyles)&lt;BR /&gt;(vlax-put-property (vlax-get styl 'markerdisplaystyleplan) 'color "BYLAYER")&lt;BR /&gt;(vlax-put-property (vlax-get styl 'labeldisplaystyleplan) 'color "BYLAYER")&lt;BR /&gt;(vlax-put-property (vlax-get styl 'markerdisplaystylemodel) 'color "BYLAYER")&lt;BR /&gt;(vlax-put-property (vlax-get styl 'labeldisplaystylemodel) 'color "BYLAYER")&lt;BR /&gt;(vlax-put-property (vlax-get styl 'markerdisplaystyleprofile) 'color "BYLAYER")&lt;BR /&gt;(vlax-put-property (vlax-get styl 'markerdisplaystylesection) 'color "BYLAYER")&lt;BR /&gt;)&lt;BR /&gt;(princ "\nAll point styles updated!")&lt;BR /&gt;)&lt;BR /&gt;(princ)&lt;BR /&gt;)&lt;/P&gt;</description>
      <pubDate>Mon, 19 Jul 2021 13:51:02 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/civil-3d-customization-forum/modify-lsp-to-be-used-for-all-versions/m-p/10479462#M6447</guid>
      <dc:creator>mikemcculley5692</dc:creator>
      <dc:date>2021-07-19T13:51:02Z</dc:date>
    </item>
    <item>
      <title>Re: Modify lsp to be used for all versions</title>
      <link>https://forums.autodesk.com/t5/civil-3d-customization-forum/modify-lsp-to-be-used-for-all-versions/m-p/10480226#M6448</link>
      <description>&lt;P&gt;Replace this:&lt;/P&gt;
&lt;LI-CODE lang="general"&gt;(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))&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;with this:&lt;/P&gt;
&lt;LI-CODE lang="general"&gt;  (defun getaeccApp (module / *acad* C3D) ;; module must be "Land", "Pipe", "Roadway", or "Survey"
  (vl-load-com)
  (if (and (setq *acad* (vlax-get-acad-object))
	   (setq C3D (strcat "HKEY_LOCAL_MACHINE\\"
			     (if vlax-user-product-key
			       (vlax-user-product-key)
			       (vlax-product-key)
			     )
		     )
		 C3D (vl-registry-read C3D "Release")
		 C3D (substr
		       C3D
		       1
		       (vl-string-search
			 "."
			 C3D
			 (+ (vl-string-search "." C3D) 1)
		       )
		     )
		 C3D (vla-getinterfaceobject
		       (vlax-get-acad-object)
		       (strcat "AeccXUi" module ".Aecc" (if (= (strcase module) "LAND") "" module) "Application." C3D)
		     )
	   )
      )
    C3D
  )
)
     (setq c3d (getaeccapp "Land"))&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;And it will work until Autodesk decides to change something that hasn't changed in 10+ years.&lt;/P&gt;</description>
      <pubDate>Mon, 19 Jul 2021 18:27:47 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/civil-3d-customization-forum/modify-lsp-to-be-used-for-all-versions/m-p/10480226#M6448</guid>
      <dc:creator>Jeff_M</dc:creator>
      <dc:date>2021-07-19T18:27:47Z</dc:date>
    </item>
    <item>
      <title>Re: Modify lsp to be used for all versions</title>
      <link>https://forums.autodesk.com/t5/civil-3d-customization-forum/modify-lsp-to-be-used-for-all-versions/m-p/10485394#M6449</link>
      <description>&lt;P&gt;Jeff, Thanks for the help. I replaced the text you specified, but when I run it I get this&amp;nbsp;&lt;/P&gt;&lt;P&gt;#&amp;lt;VLA-OBJECT IAeccDocument 00000249a91e8de0&amp;gt;&lt;/P&gt;</description>
      <pubDate>Wed, 21 Jul 2021 15:34:23 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/civil-3d-customization-forum/modify-lsp-to-be-used-for-all-versions/m-p/10485394#M6449</guid>
      <dc:creator>mikemcculley5692</dc:creator>
      <dc:date>2021-07-21T15:34:23Z</dc:date>
    </item>
    <item>
      <title>Re: Modify lsp to be used for all versions</title>
      <link>https://forums.autodesk.com/t5/civil-3d-customization-forum/modify-lsp-to-be-used-for-all-versions/m-p/10486026#M6450</link>
      <description>&lt;P&gt;There was an extra parenthesis. Also, "BYLAYER" didn't work, I changed those to 256 which is Bylayer.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="general"&gt;;|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)
  (defun getaeccApp (module / *acad* C3D)
    ;; module must be "Land", "Pipe", "Roadway", or "Survey"
    (vl-load-com)
    (if	(and (setq *acad* (vlax-get-acad-object))
	     (setq C3D (strcat "HKEY_LOCAL_MACHINE\\"
			       (if vlax-user-product-key
				 (vlax-user-product-key)
				 (vlax-product-key)
			       )
		       )
		   C3D (vl-registry-read C3D "Release")
		   C3D (substr
			 C3D
			 1
			 (vl-string-search
			   "."
			   C3D
			   (+ (vl-string-search "." C3D) 1)
			 )
		       )
		   C3D (vla-getinterfaceobject
			 (vlax-get-acad-object)
			 (strcat "AeccXUi"
				 module
				 ".Aecc"
				 (if (= (strcase module) "LAND")
				   ""
				   module
				 )
				 "Application."
				 C3D
			 )
		       )
	     )
	)
      C3D
    )
  )
  (setq c3d (getaeccapp "Land"))
  (setq C3Ddoc (vla-get-activedocument C3D))

  (vlax-for styl (vlax-get c3ddoc 'PointStyles)
    (vlax-put-property
      (vlax-get styl 'markerdisplaystyleplan)
      'color
      256
    )
    (vlax-put-property
      (vlax-get styl 'labeldisplaystyleplan)
      'color
      256
    )
    (vlax-put-property
      (vlax-get styl 'markerdisplaystylemodel)
      'color
      256
    )
    (vlax-put-property
      (vlax-get styl 'labeldisplaystylemodel)
      'color
      256
    )
    (vlax-put-property
      (vlax-get styl 'markerdisplaystyleprofile)
      'color
      256
    )
    (vlax-put-property
      (vlax-get styl 'markerdisplaystylesection)
      'color
      256
    )
    (princ "\nAll point styles updated!")
  )
  (princ)
)&lt;/LI-CODE&gt;</description>
      <pubDate>Wed, 21 Jul 2021 19:53:06 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/civil-3d-customization-forum/modify-lsp-to-be-used-for-all-versions/m-p/10486026#M6450</guid>
      <dc:creator>Jeff_M</dc:creator>
      <dc:date>2021-07-21T19:53:06Z</dc:date>
    </item>
    <item>
      <title>Re: Modify lsp to be used for all versions</title>
      <link>https://forums.autodesk.com/t5/civil-3d-customization-forum/modify-lsp-to-be-used-for-all-versions/m-p/10486046#M6451</link>
      <description>&lt;P&gt;Thanks Jeff_M! Quick question. If I wanted to change to BYBLOCK, what would I need to change 256 to?&lt;/P&gt;</description>
      <pubDate>Wed, 21 Jul 2021 19:59:16 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/civil-3d-customization-forum/modify-lsp-to-be-used-for-all-versions/m-p/10486046#M6451</guid>
      <dc:creator>mikemcculley5692</dc:creator>
      <dc:date>2021-07-21T19:59:16Z</dc:date>
    </item>
    <item>
      <title>Re: Modify lsp to be used for all versions</title>
      <link>https://forums.autodesk.com/t5/civil-3d-customization-forum/modify-lsp-to-be-used-for-all-versions/m-p/10486086#M6452</link>
      <description>ByBlock = 0</description>
      <pubDate>Wed, 21 Jul 2021 20:14:04 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/civil-3d-customization-forum/modify-lsp-to-be-used-for-all-versions/m-p/10486086#M6452</guid>
      <dc:creator>Jeff_M</dc:creator>
      <dc:date>2021-07-21T20:14:04Z</dc:date>
    </item>
  </channel>
</rss>

