Lost Hidden Lines After Deriving Part Using iLogic Rules

Lost Hidden Lines After Deriving Part Using iLogic Rules

Anonymous
Not applicable
484 Views
2 Replies
Message 1 of 3

Lost Hidden Lines After Deriving Part Using iLogic Rules

Anonymous
Not applicable

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
0 Likes
485 Views
2 Replies
Replies (2)
Message 2 of 3

bradeneuropeArthur
Mentor
Mentor

Hi,

Some steps to check.

  1. is the behavior the same if you derive the assembly manually
  2. what settings are you using with step 1

When the code is used:

  1. how are the setting for this part in the dialogs.
    • reduced memory?
    • internals removed?
    • etc etc

Please make som screenshots of the 2possible methods and their dialogs.

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 3

chandra.shekar.g
Autodesk Support
Autodesk Support

@Anonymous ,

 

Can you please provide non confidential files to reproduce the behavior?

 

Thanks and regards,


CHANDRA SHEKAR G
Developer Advocate
Autodesk Developer Network



0 Likes