Community
Inventor Programming - iLogic, Macros, AddIns & Apprentice
Inventor iLogic, Macros, AddIns & Apprentice Forum. Share your knowledge, ask questions, and explore popular Inventor topics related to programming, creating add-ins, macros, working with the API or creating iLogic tools.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

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

7 REPLIES 7
Reply
Message 1 of 8
m.den.ouden
477 Views, 7 Replies

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

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

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
Labels (2)
7 REPLIES 7
Message 2 of 8

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

Regards,

Arthur Knoors

Autodesk Affiliations:

Autodesk Software:Inventor Professional 2024 | Vault Professional 2022 | Autocad Mechanical 2022
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: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

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

Regards,

Arthur Knoors

Autodesk Affiliations:

Autodesk Software:Inventor Professional 2024 | Vault Professional 2022 | Autocad Mechanical 2022
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: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 !

Message 3 of 8
m.den.ouden
in reply to: m.den.ouden

m.den.ouden
Advocate
Advocate

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

0 Likes

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

Message 4 of 8

bradeneuropeArthur
Mentor
Mentor

the 3rd party document, attached to the file!

bradeneuropeArthur_0-1683890038803.png

 

Regards,

Arthur Knoors

Autodesk Affiliations:

Autodesk Software:Inventor Professional 2024 | Vault Professional 2022 | Autocad Mechanical 2022
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: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

the 3rd party document, attached to the file!

bradeneuropeArthur_0-1683890038803.png

 

Regards,

Arthur Knoors

Autodesk Affiliations:

Autodesk Software:Inventor Professional 2024 | Vault Professional 2022 | Autocad Mechanical 2022
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: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 !

Message 5 of 8

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

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.

Message 6 of 8

bradeneuropeArthur
Mentor
Mentor

have the system also the same updates/servicepacks?

Regards,

Arthur Knoors

Autodesk Affiliations:

Autodesk Software:Inventor Professional 2024 | Vault Professional 2022 | Autocad Mechanical 2022
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: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

have the system also the same updates/servicepacks?

Regards,

Arthur Knoors

Autodesk Affiliations:

Autodesk Software:Inventor Professional 2024 | Vault Professional 2022 | Autocad Mechanical 2022
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: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 !

Message 7 of 8

m.den.ouden
Advocate
Advocate

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

0 Likes

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

Message 8 of 8

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

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

 

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report