Frame Generator Part Used for Skeleton

Frame Generator Part Used for Skeleton

KWarrenCA
Advocate Advocate
233 Views
1 Reply
Message 1 of 2

Frame Generator Part Used for Skeleton

KWarrenCA
Advocate
Advocate

We use a single part with sketches to run frames and normally turn the part to phantom so that it doesn't show up in the BOM. I'm looking for a way to when I run my iLogic to find that referenced part and change the BOM structure to phantom. I currently have the below code but that only changes the refence skeleton in the frame generator. We always use 0000 at the end of the part for the reference part so I was thinking about using the file name to check if that is the case.

If oPDoc.DocumentInterests.HasInterest("SkeletonDoc") Then
				oPDoc.ComponentDefinition.BOMStructure = BOMStructureEnum.kPhantomBOMStructure

 

0 Likes
234 Views
1 Reply
Reply (1)
Message 2 of 2

C_Haines_ENG
Collaborator
Collaborator

See if this works.

 

Sub Main

	Dim oAsm As AssemblyDocument = ThisDoc.Document
	
	For Each oOcc As ComponentOccurrence In oAsm.ComponentDefinition.Occurrences.AllLeafOccurrences
		
        If Split(oOcc.Name, ":")(0).EndsWith("0000") Then oOcc.Definition.BOMStructure = kPhantomBOMStructure

	Next

End Sub

 

0 Likes