Message 1 of 3
Lost Hidden Lines After Deriving Part Using iLogic Rules

Not applicable
03-20-2019
03:34 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hi there,
I have an assembly file that I'm dividing into sections that will be saved as part files. However, when I run the follow iLogic rule with the code below, the derived part file loses the hidden lines (pipes) in my model.
The code runs properly but my issue is how do I retain those hidden lines and include them in the derived part?
Any help would be appreciated.
Thank you 🙂
Try Dim g_App As Inventor.InventorServer = ThisApplication Dim AssDoc as Inventor.AssemblyDocument= ThisDoc.Document ' Create a new part document that will be the shrinkwrap substitute Dim oPartDoc As PartDocument oPartDoc = g_App.Documents.Add(DocumentTypeEnum.kPartDocumentObject,"N:\Construction\02-Structure\Planning - 3D\Shared Inventor files\Templates\WWTP\Standard (mm)_wwtp.ipt" , True) Dim oPartDef As PartComponentDefinition oPartDef = oPartDoc.ComponentDefinition Dim oDerivedAssemblyDef As DerivedAssemblyDefinition oDerivedAssemblyDef = oPartDef.ReferenceComponents.DerivedAssemblyComponents.CreateDefinition(AssDoc.FullDocumentName) ' Set various shrinkwrap related options oDerivedAssemblyDef.DeriveStyle = DerivedComponentStyleEnum.kDeriveAsMultipleBodies oDerivedAssemblyDef.IncludeAllTopLevelWorkFeatures = DerivedComponentOptionEnum.kDerivedExcludeAll oDerivedAssemblyDef.IncludeAllTopLevelSketches = DerivedComponentOptionEnum.kDerivedExcludeAll oDerivedAssemblyDef.IncludeAllTopLeveliMateDefinitions = DerivedComponentOptionEnum.kDerivedExcludeAll oDerivedAssemblyDef.IncludeAllTopLevelParameters = DerivedComponentOptionEnum.kDerivedExcludeAll oDerivedAssemblyDef.DeriveStyle = DerivedComponentStyleEnum.kDeriveAsSingleBodyNoSeams Call oDerivedAssemblyDef.SetHolePatchingOptions(DerivedHolePatchEnum.kDerivedPatchNone) Call oDerivedAssemblyDef.SetRemoveByVisibilityOptions(DerivedGeometryRemovalEnum.kDerivedRemovePartsOnly) Dim oDerivedAss As DerivedAssemblyComponent oDerivedAss = oPartDoc.ComponentDefinition.ReferenceComponents.DerivedAssemblyComponents.Add(oDerivedAssemblyDef) 'Call oDerivedAss.BreakLinkToFile() ' Save the part Dim partname As String=ThisDoc.PathAndFileName(False)& ".ipt" ThisApplication.ActiveView.Fit ThisApplication.CommandManager.ControlDefinitions.Item("AppIsometricViewCmd").Execute Call oPartDoc.SaveAs(partname , False) Catch ex As Exception ErrorMessage = "Error creating ipt file." End Try