Can lisp somehow interact with Civil 3D so that I can easily adjust the elevation of a pipe in a pipe network? I did a VLAX-DUMP-OBJECT on the pipe and did not see anything about elevations.
Can lisp somehow interact with Civil 3D so that I can easily adjust the elevation of a pipe in a pipe network? I did a VLAX-DUMP-OBJECT on the pipe and did not see anything about elevations.
Unfortunately, you will probably have to move to .NET to accomplish this.
I wish Autodesk would provide easier access to the Civil 3D objects using AutoLISP.
If you have a technical question, please find the appropriate forum and ask it there.
You will get a quicker response from your fellow AUGI members than if you sent it to me via a PM or email.
jUSt
How to run external executable file(Created From C++) from autocad
Several options, but we need a bit more info about the "executable".
If it's simply an EXE file (i.e. listed as an Application in Windows Explorer and opens as a separate program), you can use the AutoCAD START command or the AutoLisp StartApp function.
If it's an ActiveX enabled EXE/DLL/TLB/etc. then you might be able to use the vlax-get-or-create-object in order to interact with it from AutoLisp.
If it's a "DLL" created with the ObjectARX libraries (usually it would then have an ARX extension) you use the arxload lisp function to load it. The plugin would then have its own commands / lisp-callable functions / other means of having it run.
I'm assuming it's not a DotNet, since you mention C++ and not C#. But if so then you need the NetLoad command.
If one of the last 2 and you want it to load automatically there's some registry keys you can check. E.g. http://through-the-interface.typepad...tic_loadi.html
Knowledge is proportional to experience, but wisdom is inversely proportional to ego!
My little bit of "wisdom": Hind-sight is useless, unless used to improve the next forethought!
Much to my surprise, it (Visual LISP) actually can tap into many Civil 3D Objects (not all), even when the Object's Properties, and Methods are not exposed to vlax-Dump-Object... As a starting point, look into the Civil 3D COM API documentation:
... These threads may also be of use:Code:(vl-load-com) (defun c:C3dComApi (/ file) (if (setq file (findfile (strcat (vl-registry-read (strcat "HKEY_LOCAL_MACHINE\\" (if vlax-user-product-key ; If 2013 (vlax-user-product-key) ; Use 2013 function (vlax-product-key) ; Use legacy function ) ) "ACADLOCATION" ) "\\help\\civil_api_activex_reference.chm" ) ) ) (startapp "explorer" file) (prompt "\n** File not found ** ") ) (princ) )
http://www.theswamp.org/index.php?topic=42585.0
http://www.cadtutor.net/forum/showth...-Length-Report
HTH
** Edit - Depending on the specific Object, and what has or has not been exposed to the COM API, Opie's suggestion of moving to .NET may be correct. Just thought this would be worth exploring before you do more work than is necessary.
"Potential has a shelf life." - Margaret Atwood