Author Topic: Find pipe structure in plan from profile view  (Read 257 times)

0 Members and 1 Guest are viewing this topic.

entget

  • Mosquito
  • Posts: 11
Find pipe structure in plan from profile view
« on: October 08, 2021, 01:25:29 PM »
I have a pipe structure in profile I want to reference to a different surface ...by selecting the structure in profile, selecting the desired surface in profile - instead of select structure, right click, structure properties, reference surface, pick ellipsis, pick other surface, select ok, select ok

...what I think I need to do is select the structure in profile, get the source objects name and change the surface there (the 'plan' view of it)

I am stuck after selecting the profile structure - is the GetModelNetworkPart method what I need? ...or am I chasing the unobtainable?

Thanks!

Jeff_M

  • King Gator
  • Posts: 4017
  • C3D user & customizer
Re: Find pipe structure in plan from profile view
« Reply #1 on: October 11, 2021, 04:51:35 PM »
Yes, that is the method to use.

BlackBox

  • King Gator
  • Posts: 3749
Re: Find pipe structure in plan from profile view
« Reply #2 on: October 12, 2021, 09:50:55 AM »
Code - Lisp: [Select]
  1. (vl-load-com)
  2.  
  3. (defun c:SsPartsInPlan (/ *error* parts ss)
  4.  
  5.   (defun *error* (msg)
  6.     (if ss (vla-delete ss))
  7.     (cond ((not msg))                                                   ; Normal exit
  8.           ((member msg '("Function cancelled" "quit / exit abort")))    ; <esc> or (quit)
  9.           ((princ (strcat "\n** Error: " msg " ** ")))                  ; Fatal error, display it
  10.     )
  11.     (princ)
  12.   )
  13.  
  14.   (if (ssget "_:L" '((0 . "AECC_GRAPH_PROFILE_NETWORK_PART")))
  15.     (progn
  16.       (setq parts (ssadd))
  17.       (vlax-for x (setq ss (vla-get-activeselectionset
  18.                              (vla-get-activedocument
  19.                                (vlax-get-acad-object)
  20.                              )
  21.                            )
  22.                   )
  23.         (setq parts (ssadd
  24.                       (vlax-vla-object->ename
  25.                         (vlax-invoke x 'getmodelnetworkpart)
  26.                       )
  27.                       parts
  28.                     )
  29.         )
  30.       )
  31.       (sssetfirst nil parts)
  32.     )
  33.   )
  34.   (*error* nil)
  35. )
  36.  
"How we think determines what we do, and what we do determines what we get."

entget

  • Mosquito
  • Posts: 11
Re: Find pipe structure in plan from profile view
« Reply #3 on: October 12, 2021, 01:52:22 PM »
thank you both! ...it seems the more i program, the fewer the resources or examples are available for what i'm after - appreciate the help very much!! the swamp never fails!!