AutoCAD Civil 3D Customization

AutoCAD Civil 3D Customization

Reply
Valued Contributor
DavidGarrigues5269
Posts: 63
Registered: ‎12-10-2004
Message 1 of 2 (148 Views)

Find insertion point for a surface label

148 Views, 1 Replies
08-01-2012 10:12 AM

If I use this code it will give me the insertion point for a block

(setq ent (car (entsel "\nSelect Main Object: ")))

(setq InsPt (assoc 10 (entget Ent)))

 

Now if I try to use this for a surface label and try to get the insertion point

(setq ent (car (entsel "\nSelect Main Object: ")))

(setq oEnt (vlax-Ename->Vla-Object ent))
(vlax-dump-object oEnt)

 

I dont see anything that will help me get the insertion point.  Is there some other sneaky way or utility function that can help me do this?

 

Help? :-)

 

thanks a bunch!

dg

Active Contributor
viktors.zilinskis
Posts: 37
Registered: ‎02-17-2010
Message 2 of 2 (141 Views)

Re: Find insertion point for a surface label

08-01-2012 11:50 AM in reply to: DavidGarrigues5269

Not sure AutoLisp "sees" any property of a surface label like insertion point. It is possible though to get a surface label "location" property using .net api (Civil3D 2013 in any case). Spot elevation labels have only one "location" property, but it might be different with other labels (for exapmle surface slope label can have 2 such properties - "location" and "location2"). Check the api reference here:

http://docs.autodesk.com/CIV3D/2013/ENU/API_Reference_Guide/index.html

 

In case of spot elevation label you might be intrested in Autodesk.Civil.DatabaseServices Namespace -> SurfaceElevationLabel Class -> SurfaceElevationLabel Properties -> Location 

 

 

 

 

Announcements
Are you familiar with the Autodesk Expert Elites? The Expert Elite program is made up of customers that help other customers by sharing knowledge and exemplifying an engaging style of collaboration. To learn more, please visit our Expert Elite website.
Need installation help?

Start with some of our most frequented solutions or visit the Installation and Licensing Forum to get help installing your software.