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: 

Object Visibility

2 REPLIES 2
SOLVED
Reply
Message 1 of 3
engilic
561 Views, 2 Replies

Object Visibility

Hi,

1. Is it possible to capture the state of checkboxes and then decide whether to do the Command Manager command or not, since it just goes alternately between on and off?

engilic_0-1667440451374.png

 

2. Is it possible to control them through objects not just through Command Manager?

3. Is it possible to control features that are within All Workfeatures separately, not just by turning all of them on or off?

 

This post is good as a partial solution but I do not know which one to apply since I do not know which one is on:

https://forums.autodesk.com/t5/inventor-ilogic-and-vb-net-forum/turning-off-object-visibility-all-wo...

Just want to capture users settings regarding Object Visibility, do the changes, do the job, and give back the original settings to the user (shouldn't every code do that unless you want permanent changes?).

Thank you

Labels (2)
2 REPLIES 2
Message 2 of 3
engilic
in reply to: engilic

Message 3 of 3
JelteDeJong
in reply to: engilic

I did not know about this function but it works better than my other solution.

        Dim doc As AssemblyDocument = ThisDoc.Document
        Dim vis = doc.ObjectVisibility

        If (vis.AllWorkFeatures) Then
            vis.AllWorkFeatures = False
            vis.ConstructionSurfaces = False
            vis.Sketches = False
            vis.Sketches3D = False
            vis.SketchDimensions = False
            vis.Annotations3D = False
            vis.ComponentAnnotations3D = False
            vis.Welds = False
            vis.WeldmentSymbols = False
        Else
            vis.AllWorkFeatures = True
            vis.ConstructionSurfaces = True
            vis.Sketches = True
            vis.Sketches3D = True
            vis.SketchDimensions = True
            vis.Annotations3D = True
            vis.ComponentAnnotations3D = True
            vis.Welds = True
            vis.WeldmentSymbols = True
        End If

Jelte de Jong
Did you find this post helpful? Feel free to Like this post.
Did your question get successfully answered? Then click on the ACCEPT SOLUTION button.

EESignature


Blog: hjalte.nl - github.com

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

Post to forums  

Autodesk Design & Make Report