See the top rated post in this thread. Click here

Page 1 of 2 12 LastLast
Results 1 to 10 of 12

Thread: lisp to turn on display of civil 3d 2017 surface triangles

  1. #1
    Member
    Join Date
    2015-12
    Location
    Harleysville PA
    Posts
    5
    Login to Give a bone
    0

    Default lisp to turn on display of civil 3d 2017 surface triangles

    Is there a way to access Civil 3D's dialog box from a lisp? I want to create a lisp to toggle on/off the surface display of triangles in Civil 3D 2017.

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

    Default Re: lisp to turn on display of civil 3d 2017 surface triangles

    Quote Originally Posted by rfazio708529 View Post
    Is there a way to access Civil 3D's dialog box from a lisp? I want to create a lisp to toggle on/off the surface display of triangles in Civil 3D 2017.
    Welcome to AUGI.


    Short answer, is no - LISP will not toggle features in a dialog.


    The slightly longer answer, is that you have two some other options:

    1. You can assign the triangles a Layer in the Surface Style, and use LISP to toggle that Layer's Freeze/Thaw, or On/Off.

    ... or

    2. You can programmatically toggle the Surface Style's display settings, like so:

    Code:
    (vl-load-com)
    
    (defun c:TST () (c:ToggleSurfaceTriangles))
    (defun c:ToggleSurfaceTriangles (/ *error* acDoc obj)
    
      (defun *error* (msg)
        (if ss
          (vla-delete ss)
        )
        (if acDoc
          (vla-endundomark acDoc)
        )
        (cond ((not msg))                                                   ; Normal exit
              ((member msg '("Function cancelled" "quit / exit abort")))    ; <esc> or (quit)
              ((princ (strcat "\n** Error: " msg " ** ")))                  ; Fatal error, display it
        )
        (princ)
      )
    
      (if (ssget '((0 . "AECC_TIN_SURFACE")))
        (progn
          (vla-startundomark
            (setq acDoc (vla-get-activedocument (vlax-get-acad-object)))
          )
          (vlax-for x (setq ss (vla-get-activeselectionset acDoc))
            (vlax-put
              (setq obj
                     (vlax-get (vlax-get (vlax-get x 'style) 'trianglestyle)
                               'displaystyleplan
                     )
              )
              'visible
              (1- (abs (vlax-get obj 'visible)))
            )
          )
        )
      )
    
      (*error* nil)
    )


    Cheers
    Last edited by BlackBox; 2016-08-17 at 07:02 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 rkmcswain's Avatar
    Join Date
    2004-09
    Location
    Earth
    Posts
    9,805
    Login to Give a bone
    0

    Default Re: lisp to turn on display of civil 3d 2017 surface triangles

    Agree with @BlackBox

    I have a routine that toggles from Style1 to Style2 which basically does what you want, so it's possible...
    R.K. McSwain | CAD Panacea |

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

    Default Re: lisp to turn on display of civil 3d 2017 surface triangles

    Quote Originally Posted by rkmcswain View Post
    I have a routine that toggles from Style1 to Style2 which basically does what you want, so it's possible...
    Cheers, RK!

    Wish AUGI supported strike-through BBCODE [s], so I could correct my post. Haha
    "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

  5. #5
    Administrator rkmcswain's Avatar
    Join Date
    2004-09
    Location
    Earth
    Posts
    9,805
    Login to Give a bone
    0

    Default Re: lisp to turn on display of civil 3d 2017 surface triangles

    Do you men mean like this?
    R.K. McSwain | CAD Panacea |

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

    Default Re: lisp to turn on display of civil 3d 2017 surface triangles

    Quote Originally Posted by rkmcswain View Post
    Do you men mean like this?
    Yes! I've never seen STRIKE before, actually - it must have been there all along, as I've only ever seen S used at other, better performing sites:

    2016-08-17_14-53-36.png

    2016-08-17_14-53-25.png



    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

  7. #7
    Administrator rkmcswain's Avatar
    Join Date
    2004-09
    Location
    Earth
    Posts
    9,805
    Login to Give a bone
    0

    Default Re: lisp to turn on display of civil 3d 2017 surface triangles

    Quote Originally Posted by BlackBox View Post
    Yes! I've never seen STRIKE before, actually - it must have been there all along, as I've only ever seen S used at other, better performing sites:
    Interesting. The "official" code for strikeout is [s] according to http://www.vbulletin.org/forum/misc.php?do=bbcode , but I don't see any mention of this "hack" being implemented here in the augi forums. Granted, I did not read every single word of this post and each one of the other posts referenced there, but I did skim them fairly thoroughly.

    EDIT: Oops. Maybe there isn't a default tag for strikethrough text. Based on some older posts, you have to add your own and I suppose you could use [ s ] or [ s t r i k e] or anything else for that matter.
    Last edited by rkmcswain; 2016-08-18 at 12:24 PM. Reason: Correction
    R.K. McSwain | CAD Panacea |

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

    Default Re: lisp to turn on display of civil 3d 2017 surface triangles

    [ S ] doesn't seem to do anything here for me. *shrugs*



    Anyway, I wonder if the OP will ever check back, and let us know how how they got on...? *not sure*
    "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

  9. #9
    Member
    Join Date
    2016-11
    Posts
    9
    Login to Give a bone
    0

    Default Re: lisp to turn on display of civil 3d 2017 surface triangles

    Quote Originally Posted by rkmcswain View Post
    Agree with @BlackBox

    I have a routine that toggles from Style1 to Style2 which basically does what you want, so it's possible...
    I think this is more what I'm looking for. I'm thinking of implementing a two letter command 'SD' (surface display) to toggle between surface styles.

    However, what happens if the current surface style, say Style3, is not one of the styles listed in the routine? I'm interested in learning how to write these routines. Would you mind sharing your routine, as well as any advice on how to learn more about coding? I'm going AU this year and am hoping to go to Midwest University next spring. If you have any specific classes I should take at AU in Vegas I'm all ear's!

    Thanks guys!

    Landon

  10. #10
    All AUGI, all the time
    Join Date
    2003-07
    Posts
    561
    Login to Give a bone
    1

    Default Re: lisp to turn on display of civil 3d 2017 surface triangles

    This is a toolbar option surprised Blackbox did not mention it, you can turn on/off any surface, if one surface it acts straight away if more than one asks which one to change via DCL. You can turn on a surface or off no need for any Toolspace interaction, we use it everyday you will have to look at the code and change your surface style names to suit. The icons are a bit rough but it was easy to make so imperial versions could be created pretty easy.

    I would appreciate any comments about its use.
    Attached Images Attached Images
    Attached Files Attached Files
    Last edited by BIG-AL; 2017-11-09 at 02:25 AM.

Page 1 of 2 12 LastLast

Similar Threads

  1. 2017: CIvil 3D 2017 Alignments from 2016 Shown Incorrectly
    By jpriego700020 in forum AutoCAD Civil 3D - Alignments
    Replies: 2
    Last Post: 2016-06-20, 01:35 AM
  2. 2016: Civil 3d Surface - Building with split levels - How to accurately show in surface for fill
    By Toni@Simpkins-Costelli in forum AutoCAD Civil 3D - General
    Replies: 2
    Last Post: 2016-06-10, 06:16 PM
  3. 2013: Editing Civil 3D Surface using Edit Surface command
    By louise.hilton861522 in forum AutoCAD Civil 3D - Surfaces
    Replies: 1
    Last Post: 2012-11-15, 09:55 AM
  4. How to turn off surface patterns in Views
    By ws in forum Revit Architecture - General
    Replies: 5
    Last Post: 2008-10-10, 01:58 PM
  5. can you turn off a material surface pattern?
    By Justin Marchiel in forum Revit Architecture - General
    Replies: 1
    Last Post: 2007-01-18, 11:08 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
  •