How to hide the first part in an assembly with VBA

How to hide the first part in an assembly with VBA

lzs013
Advocate Advocate
603 Views
3 Replies
Message 1 of 4

How to hide the first part in an assembly with VBA

lzs013
Advocate
Advocate

How to hide the first part in an assembly with VBA?Hide the part pointed by the arrow in the picture。1.png

0 Likes
Accepted solutions (1)
604 Views
3 Replies
Replies (3)
Message 2 of 4

bradeneuropeArthur
Mentor
Mentor
Accepted solution
Public Sub main()

Dim a As AssemblyDocument
Set a = ThisApplication.ActiveDocument

Dim b As AssemblyComponentDefinition
Set b = a.ComponentDefinition

b.Occurrences.Item(1).Visible = False

End Sub

for  ilogic

Public Sub main()

Dim a As AssemblyDocument
a = ThisApplication.ActiveDocument

Dim b As AssemblyComponentDefinition
b = a.ComponentDefinition

'Dim c As Occurrence
b.Occurrences.Item(1).Visible = False


End Sub

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

Message 3 of 4

dgreatice
Collaborator
Collaborator

beware,

 

if that part is not first placement 😄 (user have edit with Ground command)

Please use the ACCEPT AS SOLUTION or KUDOS button if my Idea helped you to solve the problem.

Autodesk Inventor Professional Certified 2014
Message 4 of 4

lzs013
Advocate
Advocate

THX!

0 Likes