AutoCAD Land Desktop (Read Only)
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Selecting Multiple Hide Surface Boundaries

10 REPLIES 10
Reply
Message 1 of 11
Anonymous
1013 Views, 10 Replies

Selecting Multiple Hide Surface Boundaries

I am aware of Hidebnd by SincPacC3D for Civil 3D, but is anyone aware of a routine for LDD that will allow the user to select multiple polygons and make them hide boundaries instead of having to select each boundary one at a time?
10 REPLIES 10
Message 2 of 11
Anonymous
in reply to: Anonymous


Merry Christmas!

 

Here ya go, it's a quickie I wrote some time ago for my own
use. It does what I needed, hopefully it will work as you want, too. You must
re-import the contours after running it, but the surface is rebuilt for you.
Does NOT allow the use of "heavy" 2D plines.

 

Jeff

 

{code}

(defun c:hidebnd (/ ACADOBJ AECCAPP AECCDOC AECCPROJ AECCUTIL
AECSURF AECSURFS
      APPSTR BOUNDS COORDS ENT IDX
INPUTS NEWCOORDS OBJ SS VRSN)
    (setq vrsn
(vlax-product-key))
  (cond ((vl-string-search "R16.2" vrsn) (setq
appstr "4"))
 ;;2006
 ((vl-string-search "R17.0" vrsn) (setq
appstr "6"))
 ;;2007
 ((vl-string-search "R17.1" vrsn) (setq
appstr "7"))
 ;;2008
 ((vl-string-search "R17.2" vrsn) (setq
appstr "8"))
 ;;2009
 (t (alert "This version of LDT not
supported!"))
  )
  (defun make3dlist (coords
elev)
    (setq newcoords '())
    (while
coords
      (setq newcoords (append newcoords (list
(car coords) (cadr coords) elev))
     coords (cdr (cdr
coords))
     )
     
)
    newcoords
    )
(if
  (and
(setq acadObj (vlax-get-acad-object))
      
(setq aeccApp
(vla-getInterfaceObject
        
acadObj
         (strcat
"Aecc.Application." appstr)
      
)
      
)
       (setq aeccDoc (vla-get-activedocument
aeccApp))
       (setq aeccUtil (vlax-get
aeccDoc "utility"))
       (setq aeccProj
(vlax-get aeccApp 'activeProject))
       (setq
aecSurfs (vlax-get aeccProj "Surfaces"))
      
(setq aecSurf (vlax-get aecSurfs
"Currentsurface"))
       (setq aecSurf
(vla-item aecSurfs aecSurf))
       )
 
(progn
    (setq inputs (vlax-get aecSurf
'inputs)
   bounds (vlax-get inputs 'boundaries)
  
)
    (if (setq ss (ssget '((0 .
"LWPOLYLINE,3DPOLYLINE"))))
     
(progn
 (setq idx -1)
 (while (setq ent (ssname ss (setq idx (1+
idx))))
   (setq obj (vlax-ename->vla-object
ent)
  coords (vlax-get obj 'coordinates))
   (if (eq
"AcDbPolyline" (vla-get-objectname obj))
     (setq
coords (make3dlist coords (vla-get-elevation obj)))
    
)
   (vlax-invoke bounds 'add 1 actrue coords "added by JMM
code");;; 1 = Hide boundary
   )
 (vlax-invoke aecSurf
'build)
 )
      )
   
)
  )
  (vlax-release-object aecSurf)
 
(vlax-release-object aeccApp)
  (princ)
  )

{code}


style="PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px">
I
am aware of Hidebnd by SincPacC3D for Civil 3D, but is anyone aware of a
routine for LDD that will allow the user to select multiple polygons and make
them hide boundaries instead of having to select each boundary one at a
time?
Message 3 of 11
Anonymous
in reply to: Anonymous

Thank you, but I tried to run this and I keep getting a syntax error when I try to load this routine.
Any suggestions?
Message 4 of 11
Anonymous
in reply to: Anonymous


It's possible the formatting is getting munged by the web
software. I'm attaching the lisp file this time, it loads & runs
here.


style="PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px">
Thank
you, but I tried to run this and I keep getting a syntax error when I try to
load this routine. Any suggestions?
Message 5 of 11
Anonymous
in reply to: Anonymous


Oops, hit the send button by accident....here's the lisp
file.


style="PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px">
"Jeff Mishler" <miffATsonicDOTnet> wrote in message
href="news:6099314@discussion.autodesk.com">news:6099314@discussion.autodesk.com
...


It's possible the formatting is getting munged by the web
software. I'm attaching the lisp file this time, it loads & runs
here.


style="PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px">
Thank
you, but I tried to run this and I keep getting a syntax error when I try to
load this routine. Any
suggestions?
Message 6 of 11
Anonymous
in reply to: Anonymous

I am having the same problem as the original poster of this thread, I am using LDD 2008. I have a surface I need to run that has over 1,100 interior boundaries (hide boundaries) in it. I cannot believe this LDD program does not already have a built in option to select multiple hide boundaries at one time. Inroads has this function and it works beautifully. Not sure why this has never been addressed in LDD but it is a major problem with some jobs. I have downloaded the .zip file posted by Jeff Mishler and tried using that LISP routine. It loads fine, But I cannot select any lines or seem to use the LISP file. If anyone knows a quicker way to load multiple hide boundaries in one shot, I would greatly appreciate some help with this problem, As I have been trying to figure this out for quite some time.

Message 7 of 11
Jeff_M
in reply to: Anonymous

Hi,

Can you be more specific as to why this doesn't work for you? I've tested it in versions thru 2009 and have no issues. I see you said "I cannot select any lines", if that is truly the case, well, it expects you to select LWPolylines (polygons) or 3dPolylines. 

 

I don't check this group much, in fact the only reason I did now was to find this thread to point you to it based on your request in the C3D forums. You may contact me direct, if you like, to work out why it's not working for you. miff AT sonic DOT net

Jeff_M, also a frequent Swamper
EESignature
Message 8 of 11
Anonymous
in reply to: Jeff_M

I am trying to load 3d Polylines as Interior Boundaries. It appears I can load your LISP routine. But when I try and select my Interior boundaries, ACAD replies 0 found, 0 selected. Not sure I can be more specific than that. Also The LSP routine seems to be causing some kind of error message. As I tried using this routine again this morning as a test. And again it did not work, But it caused ACAD error messages. A couple different error messages, but they don't come up right away. So I am not sure where the probelm lies, Still could be me, But I cannot get this routine to do what I need it to.

Message 9 of 11
Anonymous
in reply to: Anonymous

tried one last time. Caused ACAD to crash completely. Had error msg: Runtime Error! R6025 - Pure Virtual Function Call

 

In case that helps determine the problem.

Message 10 of 11
Jeff_M
in reply to: Anonymous

If you would like to try this version, I think it should work for you. I had incorrectly filtered for 3dPolys which is why you couldn't select them.

 

That Pure Virtual Function Call error is something that used to pop up due to a glitch internal to LDT when we tried to edit surfaces in code. I thought that was fixed long ago, though. Have you applied any service packs for LDT2008?

 

I no longer have 2008 installed to test this, but it does work in 2009 so it should work in 2008, too. If it still errors, and you are able to send a drawings and project data to me, I may be able to track down where it's failing.

Jeff_M, also a frequent Swamper
EESignature
Message 11 of 11
Anonymous
in reply to: Jeff_M

Thanks Jeff for your help, I appreciate it. I tried the new routine once and could not get it to work either, I was typing hidebnd for the command after loading, but ACAD did not recognize it. I have gotten pretty busy the last couple of days and have not had any time to play with it. So just figured I would say thanks for your efforts, and I will post in the future if I am able to get it to work or not.

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report