Results 1 to 6 of 6

Thread: Code for Civil 3D alignment/profile selection combobox?

  1. #1
    Member
    Join Date
    2015-01
    Posts
    27
    Login to Give a bone
    0

    Default Code for Civil 3D alignment/profile selection combobox?

    Hi all,
    Since my previous question is unanswered, let's try with something easier:

    Many of the dialogs in Civil3D propose a combobox with all the alignments, profiles, surfaces or other objects.



    I suppose there's a way to use them without having to building them from scratch, but I can't find any information about it.
    Do you know how to use them in a civil3d plugin?
    Attached Images Attached Images

  2. #2
    Administrator BlackBox's Avatar
    Join Date
    2009-11
    Posts
    5,714
    Login to Give a bone
    0

    Default Re: Code for Civil 3D alignment/profile selection combobox?

    To call native dialogs in AutoCAD, I normally P/Invoke using the desired dialog's garbled name, which you can retrieve from Acad.exe, AcCore.exe, etc using Dumpbin.

    That said, I've admittedly not found a need to do so for Civil 3D yet. Haha

    In any event, as it may help you to understand P/Invoke better, this old DevBlog article may be of use; note the implicit framework/build limitations that Tony mentions in the comments section:

    http://through-the-interface.typepad...the-pinvo.html



    Cheers
    Last edited by BlackBox; 2016-02-13 at 06:45 PM.
    "How we think determines what we do, and what we do determines what we get."

    Sincpac C3D ~ Autodesk Exchange Apps

    Computer Specs:
    Dell Precision 3660, Core i9-12900K 5.2GHz, 64GB DDR5 RAM, PCIe 4.0 M.2 SSD (RAID 0), 16GB NVIDIA RTX A4000

  3. #3
    Administrator BlackBox's Avatar
    Join Date
    2009-11
    Posts
    5,714
    Login to Give a bone
    0

    Default Re: Code for Civil 3D alignment/profile selection combobox?

    Apparently this is not yet possible to do (to P/Invoke C3D native dialogs), as Civil 3D does not expose its dialogs the way AutoCAD does, using the process above.

    I've posted an inquiry about this in the Civil 3D Futures forums (I attempted the Autodesk Civil 3D Customization forum around 1:30 PST, but they were still down for maintenance), to see if I can get Autodesk to confirm, and/or God willing a thousand times actually expose this functionality in the coming 2017 release (unlikely), if not consider it in the coming years. *crossing fingers*

    Cheers
    "How we think determines what we do, and what we do determines what we get."

    Sincpac C3D ~ Autodesk Exchange Apps

    Computer Specs:
    Dell Precision 3660, Core i9-12900K 5.2GHz, 64GB DDR5 RAM, PCIe 4.0 M.2 SSD (RAID 0), 16GB NVIDIA RTX A4000

  4. #4
    Member
    Join Date
    2015-01
    Posts
    27
    Login to Give a bone
    0

    Default Re: Code for Civil 3D alignment/profile selection combobox?

    Thanks BlackBox for your help.
    In the meantime I found some code online to "manually" build a simple combobox with the objects I need.

  5. #5
    Administrator Opie's Avatar
    Join Date
    2002-01
    Location
    jUSt Here (a lot)
    Posts
    9,095
    Login to Give a bone
    0

    Default Re: Code for Civil 3D alignment/profile selection combobox?

    Quote Originally Posted by a.ghensi689507 View Post
    Thanks BlackBox for your help.
    In the meantime I found some code online to "manually" build a simple combobox with the objects I need.
    Would you mind sharing the online source?
    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

  6. #6
    Member
    Join Date
    2015-01
    Posts
    27
    Login to Give a bone
    0

    Default Re: Code for Civil 3D alignment/profile selection combobox?

    Quote Originally Posted by Opie View Post
    Would you mind sharing the online source?
    Sure, here you are!
    And a more complete walktrhough with an AlignmentStyle combobox
    Note that I still have to test it, because I've decided to do a quick mockup with VBA(using excel as input dialog and VBA to connect to COM API), but I'm planning on transitioning to .NET

Similar Threads

  1. Code to filter the number of element from selection
    By alexhung91687250 in forum Revit - API
    Replies: 2
    Last Post: 2015-01-08, 12:58 AM
  2. Replies: 7
    Last Post: 2012-03-30, 06:34 AM
  3. 3dpline from alignment & profile?
    By Maverick91 in forum AutoCAD Civil 3D - General
    Replies: 2
    Last Post: 2011-07-14, 04:30 PM
  4. Adding code generated entities to a selection set
    By lambwill in forum Dot Net API
    Replies: 3
    Last Post: 2010-08-19, 05:51 AM
  5. Sta,Off on Alignment to profile
    By mlepelletier.182210 in forum AutoCAD Civil 3D - Alignments
    Replies: 2
    Last Post: 2009-02-27, 06:37 PM

Tags for this Thread

Posting Permissions

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