Select all Fittings in a Pipe Run

Select all Fittings in a Pipe Run

e_stiles
Explorer Explorer
753 Views
14 Replies
Message 1 of 15

Select all Fittings in a Pipe Run

e_stiles
Explorer
Explorer

I'm need a way to select all the Pressure Pipe Fittings that belong to a specified pipe run.  Using LISP, I know how to select all the fittings in a drawing, but I don't know how to tell what Pipe Run a fitting belongs to.  Any Ideas?

0 Likes
754 Views
14 Replies
Replies (14)
Message 2 of 15

paullimapa
Mentor
Mentor

share a sample dwg with different pipe runs & pressure pipe fittings.


Paul Li
IT Specialist
@The Office
Apps & Publications | Video Demos
0 Likes
Message 3 of 15

e_stiles
Explorer
Explorer

The attached file has some pipe runs.  This file is what I use to learn pipe runs with.

0 Likes
Message 4 of 15

hosneyalaa
Advisor
Advisor

THE LISP NOT WORK  WITH  pipe runs  , YOU NET  API .NET  CIVIL3D

OR

DYNAMO

 

hosneyalaa_0-1747493126946.png

 

0 Likes
Message 5 of 15

e_stiles
Explorer
Explorer

I've never used or tried Dynamo.  I'm more of a LISP programmer.  Maybe it's time I learn this new Dynamo programming language, so I'll take a look at this.  

0 Likes
Message 6 of 15

Sea-Haven
Mentor
Mentor

I think it can be done having worked with CIVIL drainage etc. You need to set up runs as say plines. Then you can look at each run and each vertice what block is at vertice. Using Xdata can add a label to each run.

 

I am not sure if CIV3D has road- sewer/water/Gas/pressure network, only ever did stormwater. There will be software out there to do pressure networks do a Google.

 

Dynamo is not included in all Autodesk software.

0 Likes
Message 7 of 15

e_stiles
Explorer
Explorer

I've exhausted my google searching, which is why I gave up and asked here.  From your post, you may not know but AutoCAD Civil now has a new way of inserting Pressure Pipes that are called "Pipe Runs".  The pipes can be created by selecting a polyline and then it turns that polyline into an Alignment.  Also, the pipes and fitting also follow a profile line if you create a profile view.  So, if the Alignment is edited, the Pipes and fittings will automatically update to the new layout of the Alignment, which means they are all linked together.

I was going to go about this by grabbing all of the PIs (Xs and Ys vertices) from the Pipe Run Alignment and then see what fittings matched up with those PIs (Xs and Ys).  But you may need to add fittings in the profile.  For example, to dip down below a crossing pipe and those fittings would not match with the PIs since there wouldn't be a vertex on the alignment at that point.  So, it would have to be all the fittings that are along the alignment, which I think I could do because there are functions dealing with polylines and I think they also work with Alignments.

But, I was thinking since all of the fittings already are somehow linked to that alignment then there has to be some DXF code that tells you what alignment (Pipe Run) that the fitting belongs to.  Or maybe a VLA-GET-?????? command that gets alignment from a fitting.  There are so many different VLA-GET- functions that I'm not sure if such a thing exists.

0 Likes
Message 8 of 15

Sea-Haven
Mentor
Mentor

Just a comment about my back ground spent 10 years as a Civil Software representative, staring before Land desktop and CIV3D. At my last workplace day to day tasks were to do with road works, so know about making networks from plines. Yes you are right just having an alignment does not mean the pipe does not come out of the ground, need the vertical profile to design that part, water mains in particular have very controlled bend angles that must be adhered to.

 

Having played with getting info from CIV3D it can be quite difficult, often you need to look in more than one area for answers, the alignment is one thing but the pipe fittings are probably held in a different section, linked in some way to the "pipe run"

 

Just a quick one appload this and click on a pipe, post back here what you get. 

 

;;;===================================================================; 
;;; DumpIt                                                            ; 
;;;-------------------------------------------------------------------; 
;;; Dump all methods and properties for selected objects              ; 
;;;===================================================================; 
(defun C:Dumpit ( / ent) 
  (while (setq ent (entsel "\n pick object ")) 
    (vlax-Dump-Object 
      (vlax-Ename->Vla-Object (car ent)) 
    ) 
  ) 
  (princ) 
)

Also try this by copy and paste to command line.

(dumpallproperties (car (entsel "\nPick pipe ")))

 

0 Likes
Message 9 of 15

e_stiles
Explorer
Explorer

This is from a Pressure Pipe:

Pick pipe Begin dumping object (class: AeccDbPressurePipe)
AREA (type: double) = Failed to get value
Annotative (type: bool) (LocalName: Annotative) = Failed to get value
AnnotativeScale (type: AcString) (RO) (LocalName: Annotative scale) = Failed to get value
Area (type: double) (RO) (LocalName: Area) = 0.000000
BlockId (type: AcDbObjectId) (RO) = 1e4365311f0
CastShadows (type: bool) = 1
ClassName (type: AcString) (RO) =
Closed (type: bool) (RO) (LocalName: Closed) = Failed to get value
CollisionType (type: AcDb::CollisionType) (RO) = 1
Color (type: AcCmColor) (LocalName: Color) = BYLAYER
EndParam (type: double) (RO) = 1.000000
EndPoint/X (type: double) (RO) (LocalName: End X) = 0.000000
EndPoint/Y (type: double) (RO) (LocalName: End Y) = 0.000000
EndPoint/Z (type: double) (RO) (LocalName: End Z) = 1.000000
ExtensionDictionary (type: AcDbObjectId) (RO) = 0
Handle (type: AcDbHandle) (RO) = be77
HasFields (type: bool) (RO) = 0
HasSaveVersionOverride (type: bool) = 0
Hyperlinks (type: AcDbHyperlink*)
IsA (type: AcRxClass*) (RO) = AeccDbPressurePipe
IsAProxy (type: bool) (RO) = 0
IsCancelling (type: bool) (RO) = 0
IsEraseStatusToggled (type: bool) (RO) = 0
IsErased (type: bool) (RO) = 0
IsModified (type: bool) (RO) = 0
IsModifiedGraphics (type: bool) (RO) = 0
IsModifiedXData (type: bool) (RO) = 0
IsNewObject (type: bool) (RO) = 0
IsNotifyEnabled (type: bool) (RO) = 0
IsNotifying (type: bool) (RO) = 0
IsObjectIdsInFlux (type: bool) (RO) = 0
IsPeriodic (type: bool) (RO) = 0
IsPersistent (type: bool) (RO) = 1
IsPlanar (type: bool) (RO) = 1
IsReadEnabled (type: bool) (RO) = 1
IsReallyClosing (type: bool) (RO) = 0
IsTransactionResident (type: bool) (RO) = 0
IsUndoing (type: bool) (RO) = 0
IsWriteEnabled (type: bool) (RO) = 0
LayerId (type: AcDbObjectId) (LocalName: Layer) = 1e4033b8ef0
LineWeight (type: AcDb::LineWeight) (LocalName: Lineweight) = -1
LinetypeId (type: AcDbObjectId) (LocalName: Linetype) = 1e436531150
LinetypeScale (type: double) (LocalName: Linetype scale) = 1.000000
LocalizedName (type: AcString) (RO) =
MaterialId (type: AcDbObjectId) (LocalName: Material) = 1e43788bb40
MergeStyle (type: AcDb::DuplicateRecordCloning) (RO) = 1
ObjectId (type: AcDbObjectId) (RO) = 1e4370bebf0
OwnerId (type: AcDbObjectId) (RO) = 1e4365311f0
PlotStyleName (type: AcString) (RO) (LocalName: Plot style) = ByColor
ReceiveShadows (type: bool) = 1
ShadowDisplay (type: AcDb::ShadowFlags) (RO) (LocalName: Shadow Display) = Failed to get value
StartParam (type: double) (RO) = 0.000000
StartPoint/X (type: double) (RO) (LocalName: Start X) = 0.000000
StartPoint/Y (type: double) (RO) (LocalName: Start Y) = 0.000000
StartPoint/Z (type: double) (RO) (LocalName: Start Z) = 0.000000
StyleId (type: AcDbObjectId) nil

 

This is from the Pressure Pipe Fitting:

Pick pipe Begin dumping object (class: AeccDbFitting)
AREA (type: double) = Failed to get value
Annotative (type: bool) (LocalName: Annotative) = Failed to get value
AnnotativeScale (type: AcString) (RO) (LocalName: Annotative scale) = Failed to get value
Area (type: double) (RO) (LocalName: Area) = 0.000000
BlockId (type: AcDbObjectId) (RO) = 1e4365311f0
CastShadows (type: bool) = 1
ClassName (type: AcString) (RO) =
Closed (type: bool) (RO) (LocalName: Closed) = Failed to get value
CollisionType (type: AcDb::CollisionType) (RO) = 1
Color (type: AcCmColor) (LocalName: Color) = BYLAYER
EndParam (type: double) (RO) = 1.000000
EndPoint/X (type: double) (RO) (LocalName: End X) = 6343714.020777
EndPoint/Y (type: double) (RO) (LocalName: End Y) = 1896196.082724
EndPoint/Z (type: double) (RO) (LocalName: End Z) = 502.830874
ExtensionDictionary (type: AcDbObjectId) (RO) = 0
Handle (type: AcDbHandle) (RO) = be79
HasFields (type: bool) (RO) = 0
HasSaveVersionOverride (type: bool) = 0
Hyperlinks (type: AcDbHyperlink*)
IsA (type: AcRxClass*) (RO) = AeccDbFitting
IsAProxy (type: bool) (RO) = 0
IsCancelling (type: bool) (RO) = 0
IsEraseStatusToggled (type: bool) (RO) = 0
IsErased (type: bool) (RO) = 0
IsModified (type: bool) (RO) = 0
IsModifiedGraphics (type: bool) (RO) = 0
IsModifiedXData (type: bool) (RO) = 0
IsNewObject (type: bool) (RO) = 0
IsNotifyEnabled (type: bool) (RO) = 0
IsNotifying (type: bool) (RO) = 0
IsObjectIdsInFlux (type: bool) (RO) = 0
IsPeriodic (type: bool) (RO) = 0
IsPersistent (type: bool) (RO) = 1
IsPlanar (type: bool) (RO) = 1
IsReadEnabled (type: bool) (RO) = 1
IsReallyClosing (type: bool) (RO) = 1
IsTransactionResident (type: bool) (RO) = 0
IsUndoing (type: bool) (RO) = 0
IsWriteEnabled (type: bool) (RO) = 0
LayerId (type: AcDbObjectId) (LocalName: Layer) = 1e4033b8ef0
LineWeight (type: AcDb::LineWeight) (LocalName: Lineweight) = -1
LinetypeId (type: AcDbObjectId) (LocalName: Linetype) = 1e436531150
LinetypeScale (type: double) (LocalName: Linetype scale) = 1.000000
LocalizedName (type: AcString) (RO) =
MaterialId (type: AcDbObjectId) (LocalName: Material) = 1e43788bb40
MergeStyle (type: AcDb::DuplicateRecordCloning) (RO) = 1
ObjectId (type: AcDbObjectId) (RO) = 1e4370bec10
OwnerId (type: AcDbObjectId) (RO) = 1e4365311f0
PlotStyleName (type: AcString) (RO) (LocalName: Plot style) = ByColor
ReceiveShadows (type: bool) = 1
ShadowDisplay (type: AcDb::ShadowFlags) (RO) (LocalName: Shadow Display) = Failed to get value
StartParam (type: double) (RO) = 0.000000
StartPoint/X (type: double) (RO) (LocalName: Start X) = 6343714.020777
StartPoint/Y (type: double) (RO) (LocalName: Start Y) = 1896196.082724
StartPoint/Z (type: double) (RO) (LocalName: Start Z) = 501.830874
StyleId (type: AcDbObjectId) nil

 

This is from the Alignment (Pipe Run):

Pick pipe Begin dumping object (class: AeccDbAlignment)
AREA (type: double) = Failed to get value
Annotative (type: bool) (LocalName: Annotative) = Failed to get value
AnnotativeScale (type: AcString) (RO) (LocalName: Annotative scale) = Failed to get value
Area (type: double) (RO) (LocalName: Area) = 0.000000
BlockId (type: AcDbObjectId) (RO) = 1e4365311f0
CastShadows (type: bool) = 1
ClassName (type: AcString) (RO) =
Closed (type: bool) (RO) (LocalName: Closed) = Failed to get value
CollisionType (type: AcDb::CollisionType) (RO) = 1
Color (type: AcCmColor) (LocalName: Color) = BYLAYER
EndParam (type: double) (RO) = 3.000000
EndPoint/X (type: double) (RO) (LocalName: End X) = 6343519.830616
EndPoint/Y (type: double) (RO) (LocalName: End Y) = 1896376.899472
EndPoint/Z (type: double) (RO) (LocalName: End Z) = 0.000000
ExtensionDictionary (type: AcDbObjectId) (RO) = 0
Handle (type: AcDbHandle) (RO) = be76
HasFields (type: bool) (RO) = 0
HasSaveVersionOverride (type: bool) = 0
Hyperlinks (type: AcDbHyperlink*)
IsA (type: AcRxClass*) (RO) = AeccDbAlignment
IsAProxy (type: bool) (RO) = 0
IsCancelling (type: bool) (RO) = 0
IsEraseStatusToggled (type: bool) (RO) = 0
IsErased (type: bool) (RO) = 0
IsModified (type: bool) (RO) = 0
IsModifiedGraphics (type: bool) (RO) = 0
IsModifiedXData (type: bool) (RO) = 0
IsNewObject (type: bool) (RO) = 0
IsNotifyEnabled (type: bool) (RO) = 0
IsNotifying (type: bool) (RO) = 0
IsObjectIdsInFlux (type: bool) (RO) = 0
IsPeriodic (type: bool) (RO) = 0
IsPersistent (type: bool) (RO) = 1
IsPlanar (type: bool) (RO) = 1
IsReadEnabled (type: bool) (RO) = 1
IsReallyClosing (type: bool) (RO) = 1
IsTransactionResident (type: bool) (RO) = 0
IsUndoing (type: bool) (RO) = 0
IsWriteEnabled (type: bool) (RO) = 0
LayerId (type: AcDbObjectId) (LocalName: Layer) = 1e4365275e0
LineWeight (type: AcDb::LineWeight) (LocalName: Lineweight) = -1
LinetypeId (type: AcDbObjectId) (LocalName: Linetype) = 1e436531150
LinetypeScale (type: double) (LocalName: Linetype scale) = 1.000000
LocalizedName (type: AcString) (RO) =
MaterialId (type: AcDbObjectId) (LocalName: Material) = 1e43788bb40
MergeStyle (type: AcDb::DuplicateRecordCloning) (RO) = 1
ObjectId (type: AcDbObjectId) (RO) = 1e4370bebe0
OwnerId (type: AcDbObjectId) (RO) = 1e4365311f0
PlotStyleName (type: AcString) (RO) (LocalName: Plot style) = ByColor
ReceiveShadows (type: bool) = 1
ShadowDisplay (type: AcDb::ShadowFlags) (RO) (LocalName: Shadow Display) = Failed to get value
StartParam (type: double) (RO) = 0.000000
StartPoint/X (type: double) (RO) (LocalName: Start X) = 6343818.240289
StartPoint/Y (type: double) (RO) (LocalName: Start Y) = 1896163.566156
StartPoint/Z (type: double) (RO) (LocalName: Start Z) = 0.000000
StyleId (type: AcDbObjectId) nil

0 Likes
Message 10 of 15

e_stiles
Explorer
Explorer

BTW, this doesn't have to be done in LISP.  There should be a way in AutoCAD to select all the fittings or pipes that belong to a specified Pipe Run, but there doesn't appear to be.  Yes, I can select each fitting one at a time, which takes a while.   There needs to be a quicker way.  

The idea is that once they are all selected then you can bulk change things in the properties dialog.

0 Likes
Message 11 of 15

Sea-Haven
Mentor
Mentor

You may be best asking in the CIV3D forum, as the "PIPE" network is part of CIV3D it will be proxy objects in say Autocad or in other software such as Bricscad. So any in depth searching needs to be done in CIV3D.

0 Likes
Message 12 of 15

EricStiles
Advocate
Advocate

Yes, that's already been done by someone else.  They didn't get an answer.  So I thought I would try to do it in lisp.  After all the VBA dumps and DXF code lists, I think I've decided it can't be done.  But it looks like it can be done in Dynamo.  I just need to learn how to use it.

0 Likes
Message 13 of 15

EricStiles
Advocate
Advocate

hosneyalaa, how did you get those Dynamo boxes that reference Pipe Runs and pressure pipes?

0 Likes
Message 14 of 15

hosneyalaa
Advisor
Advisor

DD.gif

0 Likes
Message 15 of 15

hosneyalaa
Advisor
Advisor
0 Likes