Search the Community
Showing results for tags 'connectpts'.
-
Recently upgraded to Civil 3D 2015 from 2013 but am having trouble using one of my most used AutoLISP commands to connect a string of points (connectpts) When I load the command I get the following error message; "; error: Automation Error. Problem in loading application" Any ideas out there? This is file; ;|Platform: AutoCAD Civil 3D Routine to draw 3dPoly between points with identical descriptions, in ascending Pt# order. by Jeff Mishler, July 25, 2007. Tested only in C3D2008. Type (vl-load-com) at command prompt first. |; (vl-load-com) (defun c:Connectpts (/ appstr coords desc grps pline point point#s points pt qbldr ss tmpgrp vrsn ) (setq vrsn (vlax-product-key)) (cond ((vl-string-search "R16.2" vrsn)(setq appstr "3.0"));;2006 ((vl-string-search "R17.0" vrsn)(setq appstr "4.0"));;2007 ((vl-string-search "R17.1" vrsn)(setq appstr "5.0"));;2008 ((vl-string-search "R17.2" vrsn)(setq appstr "6.0"));;2009 ((vl-string-search "R18.0" vrsn)(setq appstr "7.0"));;2010 ((vl-string-search "R18.1" vrsn)(setq appstr "8.0"));;2011 ((vl-string-search "R18.2" vrsn)(setq appstr "9.0"));;2012 ((vl-string-search "R19.0" vrsn)(setq appstr "10.0"));;2013 ((vl-string-search "R19.1" vrsn)(setq appstr "11.0"));;2014 ((vl-string-search "R20.0" vrsn)(setq appstr "12.0"));;2015 (t (alert "This version of C3D not supported!")) ) (if (and appstr (or *acad* (setq *acad* (vlax-get-acad-object)) ) (or *AeccApp* (setq *AeccApp* (vla-getinterfaceobject *acad* (strcat "AeccXUiLand.AeccApplication." appstr))) ) (or *AeccDoc* (setq *AeccDoc* (vlax-get *AeccApp* 'ActiveDocument)) ) (setq ss (ssget ":S:E" '((0 . "AECC_COGO_POINT")))) ) (progn (setq pt (vlax-ename->vla-object (ssname ss 0)) desc (vlax-get pt 'RawDescription) grps (vlax-get *AeccDoc* 'PointGroups) tmpgrp (vlax-invoke grps 'Add "__TEMP__") ) (setq qbldr (vlax-get tmpgrp 'querybuilder)) (vlax-put qbldr 'IncludeRawDescriptions desc) (if (> (length (setq points (vlax-get tmpgrp 'Points))) 1) (progn (setq point#s (vl-sort points ' (setq points (vlax-get *AeccDoc* 'Points)) (foreach pt# point#s (setq point (vlax-invoke points 'Find pt#)) (setq coords (append coords (list (vlax-get point 'Easting) (vlax-get point 'Northing) (vlax-get point 'Elevation) ))) ) (setq pline (vlax-invoke (vla-get-modelspace *AeccDoc*) 'Add3dPoly coords)) (vla-put-layer pline (vlax-invoke *aeccdoc* 'getvariable "Clayer")) ) ) (vlax-invoke qbldr 'clear) (vlax-invoke grps 'remove "__TEMP__") ) ) (princ) )
- 1 reply
-
- civil3d
- civil35 2015
-
(and 2 more)
Tagged with: