How to classify pipe segments through api/property?

How to classify pipe segments through api/property?

Anonymous
Not applicable
872 Views
6 Replies
Message 1 of 7

How to classify pipe segments through api/property?

Anonymous
Not applicable

Hello,

 

We have tried the solution provided in the forum:

https://forums.autodesk.com/t5/inventor-customization/get-document-subtype-framegenerator-contentcen...

 

In which we are able to classify some of the data(like run and route files) as Tubes and Pipes. However, for pipe segments data, these API is not giving us the desired result as Tubes and Pipes.

Is there any way to classify/identify this.

 

Any help will be highly appreciated. Thanks for all your help in advance.

 

Regards,

Moulla PAKALI

0 Likes
873 Views
6 Replies
Replies (6)
Message 2 of 7

bradeneuropeArthur
Mentor
Mentor

Hi,

 

I have used the additional propertysets for the filter!

For example the Content Center Files have 2 additional propertySets:

  • Content Library Component Properties
  • ContentCenter

The same for the other parts..

 

Regards,

Regards,

Arthur Knoors

Autodesk Affiliations & Links:
blue LinkedIn LogoSquare Youtube Logo Isolated on White Background


Autodesk Software:Inventor Professional 2025 | Vault Professional 2024 | Autocad Mechanical 2024
Programming Skills:Vba | Vb.net (Add ins Vault / Inventor, Applications) | I-logic
Programming Examples:
Drawing List!|
Toggle Drawing Sheet!|
Workplane Resize!|
Drawing View Locker!|
Multi Sheet to Mono Sheet!|
Drawing Weld Symbols!|
Drawing View Label Align!|
Open From Balloon!|
Model State Lock!
Posts and Ideas:
My Ideas|
Dimension Component!|
Partlist Export!|
Derive I-properties!|
Vault Prompts Via API!|
Vault Handbook/Manual!|
Drawing Toggle Sheets!|
Vault Defer Update!

! For administrative reasons, please mark a "Solution as solved" when the issue is solved !


 


EESignature

0 Likes
Message 3 of 7

Anonymous
Not applicable

Hello,

 

We have already explored the property set of documents. To find a property like a content center to identify the weather part is a pipe segment(Tube and Pipe). However, we have found anything like that.

 

Please help. It's very important for us.

 

Thanks and Regards,

Moulla Pakali

0 Likes
Message 4 of 7

bradeneuropeArthur
Mentor
Mentor

could you send the pipesegment as 2018 file

 

Regards,

Arthur Knoors

Autodesk Affiliations & Links:
blue LinkedIn LogoSquare Youtube Logo Isolated on White Background


Autodesk Software:Inventor Professional 2025 | Vault Professional 2024 | Autocad Mechanical 2024
Programming Skills:Vba | Vb.net (Add ins Vault / Inventor, Applications) | I-logic
Programming Examples:
Drawing List!|
Toggle Drawing Sheet!|
Workplane Resize!|
Drawing View Locker!|
Multi Sheet to Mono Sheet!|
Drawing Weld Symbols!|
Drawing View Label Align!|
Open From Balloon!|
Model State Lock!
Posts and Ideas:
My Ideas|
Dimension Component!|
Partlist Export!|
Derive I-properties!|
Vault Prompts Via API!|
Vault Handbook/Manual!|
Drawing Toggle Sheets!|
Vault Defer Update!

! For administrative reasons, please mark a "Solution as solved" when the issue is solved !


 


EESignature

0 Likes
Message 5 of 7

CamperUnhappy
Advocate
Advocate

Depending on what type of pipe you're actually using or how many types/grades/standards.....  this could be pretty simple or quite in depth.

 

I have just written a pretty comprehensive piece of code for my add-in suite that runs through an entire BOM and classifies all part and assemblies into categories and then further sorts them according to thickness/size/grade etc.

 

The pipe section I had planned on sorting by each grade, but ultimately I found that I could just sort by nominal diameter and then by wall thickness to get what I needed.  That being said, we don't really use a lot of pipe here and the stuff we use is generally ASME schedule pipe.

 

How my code works is I created a separate Class called BomSorterRowObject which essentially stores each BOM row item as well as it's Part Number and Item Number.  It also has 5 slots for assigning sorting parameters.  From there I created an Enumeration type that contains my 'document classifications' as well as their respective value that always goes into Sort1 which is the primary sort level of the sorting function.

 

The BOM Sorter goes through each level of the BOM and identifies each row object .....creates a new BomSorterRowObject.....and then goes about trying to identify the object type and classify it (in Sort1 using it's enum type and then for each respective type by finding it's descending sorting parameters......ie diameter, length, thickness, etc).

 

For the Content Center stuff, you can use the Property called "Family" which may help you to identify which specific folder from the content center the pipe came from.  I used Regex to look for keywords in the Family Name that would help me to classify the parts.  Another option would be to add a custom property to the Content Center parts that would help you to classify them.

 

Honestly, without more information on what you're using, how you use it, or what you're trying to do......it's hard to really offer any real specific suggestions.

0 Likes
Message 6 of 7

Curtis_Waguespack
Consultant
Consultant

Hi @Anonymous 

 

Have a look at this iLogic rule... I took some things out that were specific to my setup (so hopefully I did not break anything ) .... but this is what we use to find frame generator members and tube and pipe components.

 

I hope this helps.
Best of luck to you in all of your Inventor pursuits,
Curtis
http://inventortrenches.blogspot.com
 

 

Dim openDoc As Document
openDoc = ThisApplication.ActiveEditDocument

'Look at all of the files referenced in the open document.
Dim docFile As Document

Dim oDocInts As DocumentInterests 
Dim bHas_FG_Interest As Boolean 
Dim bHas_TP_Interest As Boolean 
Dim odocint As DocumentInterest  
Dim oAsmCompDef As AssemblyComponentDefinition
Dim oName As String

For Each docFile In openDoc.AllReferencedDocuments  

    oDocInts = docFile.DocumentInterests 
    bHas_TP_Interest = oDocInts.HasInterest("{4D39D5F1-0985-4783-AA5A-FC16C288418C}") 'T&P
	bHas_FG_Interest = oDocInts.HasInterest ("{AC211AE0-A7A5-4589-916D-81C529DA6D17}") 'Frame Gen.


	'look at everything that has a Frame Generator interest
    If bHas_FG_Interest = True Then             
         
        For Each odocint In oDocInts 
			'get the frame generator sub assembly 
            If odocint.Name = "FrameDoc" Then
                oAsmCompDef = docFile.ComponentDefinition        
                'Iterate through all of the occurrences
                Dim oOccurrence As ComponentOccurrence
                For Each oOccurrence In oAsmCompDef.Occurrences                    
                    MsgBox( "this is a frame member: " & vbLf &  oOccurrence.Name )
                Next
            End If
         Next

Else If bHas_TP_Interest = True Then   
		'look at everything that has a T&P interest
        For Each odocint In oDocInts 	
			'catch the run and set to phantom
			If odocint.Name = "Piping Run Environment" Then
				
				'make sure this is phantom
				Try
                oAsmCompDef = docFile.ComponentDefinition 
				oAsmCompDef.BOMStructure = 51971  'phantom
				Catch					
				End Try
			
			'look at anything that is not a run or route
			Else If odocint.Name <> "Piping Route Environment" And _
				odocint.Name <> "Piping Run Environment" Then
                
					oName =  "...." & Right(docFile.FullFileName,45)
					MsgBox( "this is a pipe or fitting, etc: " & vbLf &  oName )
            End If
         Next
    End If
Next

EESignature

Message 7 of 7

Anonymous
Not applicable

Hey, the solution you have provided works fine for all Tube and Pipe data except Pipe Segments(Available in T&P). The pipe segment which is part of the T&P structure is not getting identified as T&P data.

 

All other data is classified as Tubes and Pipes now with the solution you have provided. However, Pipe segment is not getting classified with the provided solution.

 

Thanks for all the help.

0 Likes