Community
Civil 3D Customization
Welcome to Autodesk’s AutoCAD Civil 3D Forums. Share your knowledge, ask questions, and explore popular AutoCAD Civil 3D Customization topics.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

text override using lisp

7 REPLIES 7
Reply
Message 1 of 8
rfg018
526 Views, 7 Replies

text override using lisp

I;m trying to modified (override) the surface label components using vlisp, simular to using text override, 

I pick the label, and found the text component, but it's seem I found the default, they all changes, plus I didn't see the override text.

 

Can someone tell me where the override text and/or  indiviable label property are stored?

 

Thanks

7 REPLIES 7
Message 2 of 8
Jeff_M
in reply to: rfg018

The text overrides are not available using the COM API, therefor lisp cannot be used (at least not directly) to edit them.

 

The TextComonentOverride IS accessible using the .NET managed API.

Jeff_M, also a frequent Swamper
EESignature
Message 3 of 8
Partha.Sarkar
in reply to: rfg018

Hi,

 

I think you need to use .NET API here and for the specific type look into the API reference doc for -

 

Label.GetTextComponentOverride

Label.SetTextComponentOverride

 

Here is a relevant link  in API Reference doc -

 

http://docs.autodesk.com/CIV3D/2014/ENU/API_Reference_Guide/html/78517b1c-4713-65c7-ff61-f6662d147a0...

 

Thanks,



Partha Sarkar
Developer Technical Services
Autodesk Developer Network

Message 4 of 8
nmessina
in reply to: Partha.Sarkar

Partha,

 

I have a Civil 3d drawing with Cogo Points that has Text Component Overides that label Rim and Invert data for 100's of structures in this drawing. Unfortunately the CAD drafter entered the data inconsistantly, is it possible to have program that can allow the users to select Cogo Points, then it extracts the Cogo Point number and Text Override to a text file? Then the users could edit the text file and later have imported back into the Text Override from the edited text file using the following to commands?

 

 

Label.GetTextComponentOverride   to extract

 

8921

<[Full Description(CU)]>

R.E.=12.85'

I.E.= (-2.49') S 12"DIP

I.E.= (-2.40') S 12"DIP

I.E.= 0.15' (S 12"DIP)

I.E.= 0.17' (S 12"DIP)

I.E.= (-2.36') E 12"CLAY

I.E.= (-2.47') W 12"CLAY

B.O.S.= (-2.41')

 

Label.SetTextComponentOverride to insert the edited text override

 

8921

<[Full Description(CU)]>

R.E.=12.85'

I.E.= (-)2.49'(S) 12"DIP

I.E.= (-)2.40'(S) 12"DIP

I.E.= 0.15'(S) 12"DIP

I.E.= 0.17'(S) 12"DIP

I.E.= (-)2.36'(E) 12"CLAY

I.E.= (-)2.47'(W) 12"CLAY

B.O.S.= (-)2.41'

 

 

 

 

component-override.png

 

 

 

Nicholas, Messina Jr., PSM
Message 5 of 8

This would be possible to do. You could even parse the data directly in the program if the numbers didn't have to change and you only wanted to change the formatting.

Civil Reminders
http://blog.civil3dreminders.com/
http://www.CivilReminders.com/
Alumni
Message 6 of 8

Actually there are time when we do have to change the numbers when we have to change elevations from NGVD 29 to NAVD 88. Unfortunately, it seems it is only possible to extract this data in C++, .NET an/or Visual Basic.  My knowledge is limited to VLISP, so if I was to start learning one of those three which is easier to learn?

 

.

Nicholas, Messina Jr., PSM
Message 7 of 8

Since you know a bit of LISP I'd suggest going with c#.NET. It has { } instead of ( ) to help orgainize things. If you like more words I'd go with vb.NET. I stay away from c++, but that might be because I learned it in briefly in college on a terminal and it wasn't as fun as the programs today. 

 

This is a good source project to get started with: http://quuxsoft.com/SincpacC3D_source.aspx

 

You'll want to use Visual Studio Community https://www.visualstudio.com/en-us/products/visual-studio-community-vs.aspx 2015 is the curren version, but AutoCAD works best on 2010 or 2012 currently. 2015 works, but some features of Visual Studio don't get along with AutoCAD like Edit and Continue.

Civil Reminders
http://blog.civil3dreminders.com/
http://www.CivilReminders.com/
Alumni
Message 8 of 8


@Civil3DReminders_com wrote:

Since you know a bit of LISP I'd suggest going with c#.NET. It has { } instead of ( ) to help orgainize things.

 

You'll want to use Visual Studio Community https://www.visualstudio.com/en-us/products/visual-studio-community-vs.aspx 2015 is the curren version, but AutoCAD works best on 2010 or 2012 currently. 2015 works, but some features of Visual Studio don't get along with AutoCAD like Edit and Continue.


I agree with the c# recommendation. I'm using the 2013 version of VS Community and the Edit & Continue works great with Autocad.

Jeff_M, also a frequent Swamper
EESignature

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Rail Community


Autodesk Design & Make Report