Results 1 to 5 of 5

Thread: Can lisp adjust the elevation of Civil 3D Pipe 2013?

  1. #1
    I could stop if I wanted to
    Join Date
    2003-11
    Posts
    427

    Default Can lisp adjust the elevation of Civil 3D Pipe 2013?

    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.

  2. #2
    Administrator Opie's Avatar
    Join Date
    2002-01
    Location
    jUSt Here (a lot)
    Posts
    6,836

    Default Re: Can lisp adjust the elevation of Civil 3D Pipe 2013?

    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

  3. #3
    Member
    Join Date
    2012-08
    Posts
    2

    Default Re: Can lisp adjust the elevation of Civil 3D Pipe 2013?

    How to run external executable file(Created From C++) from autocad

  4. #4
    Certifiable AUGI Addict irneb's Avatar
    Join Date
    2007-07
    Location
    Jo'burg SA
    Posts
    4,344

    Default Re: Can lisp adjust the elevation of Civil 3D Pipe 2013?

    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!

  5. #5
    Moderator BlackBox's Avatar
    Join Date
    2009-11
    Posts
    2,401

    Default Re: Can lisp adjust the elevation of Civil 3D Pipe 2013?

    Quote Originally Posted by Opie View Post
    Quote Originally Posted by GreyHippo View Post
    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.
    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:

    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)
    )
    ... These threads may also be of use:

    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

Similar Threads

  1. installing civil 3d 2013
    By diyarymin in forum AutoCAD Civil 3D - General
    Replies: 2
    Last Post: 2012-07-27, 07:15 PM
  2. Placing pipe with shared elevation rather than offset elevation
    By bugg_man693490 in forum Revit MEP - General
    Replies: 2
    Last Post: 2012-03-27, 03:45 PM
  3. Adjust TIN surface elevation by scale factor
    By CASEY.206477 in forum AutoCAD Civil 3D - Surfaces
    Replies: 1
    Last Post: 2009-05-24, 06:53 AM
  4. Cannot adjust elevation points on a floor
    By JONB.102117 in forum Revit Architecture - General
    Replies: 1
    Last Post: 2007-09-14, 06:52 PM
  5. adjust pipe inverts to edge of structures
    By CBLENDERMANN in forum Civil 3D - Civil Design Companion - General
    Replies: 4
    Last Post: 2004-06-15, 02:02 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •