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 of sketches API

1 REPLY 1
SOLVED
Reply
Message 1 of 2
lmc.engineering
820 Views, 1 Reply

Object Visibility of sketches API

Hi all,

 

I am a bit of a noob when it comes to fully understanding programming, and this is a prime example of a hole in my knowledge:

 

All I want to do is use an iLogic rule to turn off sketch visibility using the Object visibility. I don't need to cycle through all parts to get the sketches and turn off.. I can actually do that already, I just want the override option for automated screenshots.

 

I have tried the following

 

Inventor.ObjectVisibility.Sketches = False

 

AssemblyDocument.ObjectVisibility.Sketches = False (I believe this method to be read only)

 

I can see in Visual studio object browser that this is possible, but my stupidity is stopping me from getting the right line of code..

 

I know this should be simple for someone who can actually program, I just cant get the **** thing to work.

 

Any help is greatly appreciated

 

 

1 REPLY 1
Message 2 of 2

Hi,

 

This is pretty easy to accomplish

 

(vba code)

 

Sub ChangeViz()

Dim oDoc As Document
Set oDoc = ThisApplication.ActiveDocument

oDoc.ObjectVisibility.Sketches = False


End Sub

 

If you think this answer fullfilled your needs, improved your knowledge or leads to a solution,
please feel free to "kudos"

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

Post to forums  

Autodesk Design & Make Report