AutoCAD Civil 3D Customization

AutoCAD Civil 3D Customization

Reply
Contributor
mjsmith
Posts: 13
Registered: ‎06-23-2008
Message 1 of 9 (323 Views)

Civil 3D 2012 COM and the command line.

323 Views, 8 Replies
04-20-2012 06:14 AM

I am attempting to access the command line via the com interop in order to manipulate the command lne to apply labels with some lisp and command line interaction. I have succeeded in getting this VB.Net app working on Civil 3D 2010 but thus far no luck with Civil 3D 2012. Been down the full gambit I'd hate to have to flip the script and call a .Net form from a lisp app to get this done. Any suggestions on why commandline access works on 2010 but not 2012. I have applied the registry fix to be able to access the needed AEC 6.7 references. Done the fiberworld fix with closing all the documents. I'm open to any suggestions or preferably a .Net exposed API to apply Labels along an alignment in batch...Hint Hint Autodesk :smileywink:

 

Regards,

Michael J. Smith

 

 

 

 

*Expert Elite*
Jeff_M
Posts: 4,448
Registered: ‎07-22-2003
Message 2 of 9 (322 Views)

Re: Civil 3D 2012 COM and the command line.

04-20-2012 06:27 AM in reply to: mjsmith

mjsmith wrote:

..... preferably a .Net exposed API to apply Labels along an alignment in batch....

 

 

 



Can't help with the COM commandline issue without seeing some code. However, what type of labels do you want to add? In 2012 you can create StationOffset labels.

Jeff_M, also a frequent Swamper
Contributor
mjsmith
Posts: 13
Registered: ‎06-23-2008
Message 3 of 9 (319 Views)

Re: Civil 3D 2012 COM and the command line.

04-20-2012 06:44 AM in reply to: Jeff_M

Really that's very intriguing the label type is Station and Offset while pulling a description from a cogo point. You mind telling me more I have been looking to do this for quite sometime.

 

VS 2008 Civil 3D 2010 Project attached.

 

Thanks for the feedback Jeff.

 

Regards,

Michael J. Smith

 

 

 

 

*Expert Elite*
Jeff_M
Posts: 4,448
Registered: ‎07-22-2003
Message 4 of 9 (313 Views)

Re: Civil 3D 2012 COM and the command line.

04-20-2012 09:57 AM in reply to: mjsmith

Michael, what issues were you having getting this to run in 2012? After copying the vbproj file, renaming it to reference 2012 and setting the references for 2012 and adding conditional compilation symbol for 2012, then adding some minor additions to the Civil3DConnect code, it works fine in 2012.

 

I will try to get you a revised zip file with a .NET version included during my lunch today (it's 10 a.m. here in California).

Jeff_M, also a frequent Swamper
Contributor
mjsmith
Posts: 13
Registered: ‎06-23-2008
Message 5 of 9 (310 Views)

Re: Civil 3D 2012 COM and the command line.

04-20-2012 10:26 AM in reply to: Jeff_M

Thanks I am very glad to here that it work for you on Civil 3D 2012 gives me hope. :smileyvery-happy:

 

Regards,

Michael J. Smith

 

*Expert Elite*
Jeff_M
Posts: 4,448
Registered: ‎07-22-2003
Message 6 of 9 (305 Views)

Re: Civil 3D 2012 COM and the command line.

04-20-2012 12:39 PM in reply to: mjsmith

OK, attached is a new zip file with 3 projects. Your original for 2010 with some alterations for the Conditional Compilation Symbols, a new for 2012 using the same code as 2010, and a new for 2012_NET which uses new code and does not use the COM Interops. Both of the 2012 versions work, I didn't test the 2010 but it should work as it did before.

 

I don't recall if I rebuilt all of the Debug/Release builds before creating the zip, so make sure you build them yourself before testing. (The 2012_NET Debug was the last one I did test, so it should be good.)

 

Oh, and the NET version should also work in 2011 without any changes (untested though), just load the dll and run.

Jeff_M, also a frequent Swamper
Contributor
mjsmith
Posts: 13
Registered: ‎06-23-2008
Message 7 of 9 (300 Views)

Re: Civil 3D 2012 COM and the command line.

04-20-2012 01:04 PM in reply to: Jeff_M

Thanks for all the help Jeff. I appreciate you taking the time to share.

 

Regards,

Michael J. Smith

 

 

Contributor
mjsmith
Posts: 13
Registered: ‎06-23-2008
Message 8 of 9 (298 Views)

Re: Civil 3D 2012 COM and the command line.

04-20-2012 01:16 PM in reply to: mjsmith

Works line a charm....Thanks Jeff that really opens the door up for some cool apps.

 

Regards,

Michael J. Smith

 

*Expert Elite*
Jeff_M
Posts: 4,448
Registered: ‎07-22-2003
Message 9 of 9 (296 Views)

Re: Civil 3D 2012 COM and the command line.

04-20-2012 01:30 PM in reply to: mjsmith

Glad I could help. 

 

If you find a response which answers your question, please be sure to accept the actual post which helped you as the solution. This will help future searchers quickly find answers to their own questions. Thanks!

Jeff_M, also a frequent Swamper
Post to the Community

Have questions about Autodesk products? Ask the community.

New Post
Need installation help?

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