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
Michael J. Smith
..... 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.
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.
Michael J. Smith
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).
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.
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!