Announcements
Attention for Customers without Multi-Factor Authentication or Single Sign-On - OTP Verification rolls out April 2025. Read all about it here.

Different Outcome between systems with the same code (same file) when importing a step file

m.den.ouden
Advocate

Different Outcome between systems with the same code (same file) when importing a step file

m.den.ouden
Advocate
Advocate

I have a function that imports a stepfile. but the outcome is a little bit different between systems.

some of them get a foldable icon at the top and some of them don't. Each time I run the code the previous icon remains. does any one know how to delete the previous (all) foldable icons. see both attachments.

 

Before importing the step file, all features are deleted (solids)

 

Code Calling the function:

Dim sStepFile As String = "H:\Navision documents\Artikelen\Twentebelt\BELTS\GR\SK\" & Parameter.Param("econ_Belt_ArtNo").Comment & "\" & Parameter.Param("econ_Belt_ArtNo").Comment & " Wiremesh Belt.stp" 
If (Not System.IO.File.Exists(sStepFile)) Then Return
Dim belt As ImportedComponent = InventorApp.ImportSTP(sStepFile,ImportedSurfaceOrganizationTypeEnum.kImportedAsCompositeFeatures,  ImportedAssemblyOrganizationTypeEnum.kImportedAsMultibodyPart, ImportedModelGeometryTypeEnum.kSolidsModelGeometryType, False)

Code The function:

Shared Function ImportSTP(sStepFilePath As String, ImportedSurfaceOrganizationType As ImportedSurfaceOrganizationTypeEnum, ImportedAssemblyOrganizationType As ImportedAssemblyOrganizationTypeEnum, _
ImportedModelGeometryType As ImportedModelGeometryTypeEnum, Optional LinkedReference As Boolean = False) As Inventor.ImportedComponent
	Dim oIComGenDef As ImportedGenericComponentDefinition = oPartCompDef.ReferenceComponents.ImportedComponents.CreateDefinition(sStepFilePath)
	oIComGenDef.ReferenceModel = LinkedReference
	oIComGenDef.ImportedAssemblyOrganizationType = ImportedAssemblyOrganizationType
	oIComGenDef.ImportedSurfaceOrganizationType = ImportedSurfaceOrganizationType
	oIComGenDef.ImportedModelGeometryTypes = ImportedModelGeometryType
		
	Dim oImportedGenericComp As Inventor.ImportedGenericComponent = oPartCompDef.ReferenceComponents.ImportedComponents.Add(oIComGenDef)
	Return oImportedGenericComp
End Function
0 Likes
Reply
598 Views
7 Replies
Replies (7)

bradeneuropeArthur
Mentor
Mentor
can you have a look in the html file and look for differences?

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 !

0 Likes

m.den.ouden
Advocate
Advocate

What do you mean with html file? where can I find this html file?

0 Likes

bradeneuropeArthur
Mentor
Mentor

the 3rd party document, attached to the file!

bradeneuropeArthur_0-1683890038803.png

 

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 !

0 Likes

m.den.ouden
Advocate
Advocate

They are exactly the same. Also because he removes all the old references and build up the file again from scratch. Each time the code runs.

0 Likes

bradeneuropeArthur
Mentor
Mentor

have the system also the same updates/servicepacks?

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 !

0 Likes

m.den.ouden
Advocate
Advocate

Yes I forgot to mention that, whe are both on the latest version (same version).

0 Likes

m.den.ouden
Advocate
Advocate

Maybe you or someone else can tell me what the yellow marked icon is and how I can reach it in the Inventor API

mdenouden_0-1684135248908.png

 

0 Likes