Is there an iLogic code that can make a model sketch visible or not based on the sketch name

Is there an iLogic code that can make a model sketch visible or not based on the sketch name

chris
Advisor Advisor
252 Views
1 Reply
Message 1 of 2

Is there an iLogic code that can make a model sketch visible or not based on the sketch name

chris
Advisor
Advisor

Is there an iLogic code that can make a model sketch visible or not based on the sketch name and maybe a true/false parameter?

I'm working on a "calculator of sorts that is in one of my part files and I need to be able to show visibility of certain sketches if that is possible.

0 Likes
253 Views
1 Reply
Reply (1)
Message 2 of 2

A.Acheson
Mentor
Mentor

Hi @chris 

What you need is to set a planar sketch  visible. So navigate to API help and objects page for planarsketch here find the planar sketch object and check the property for visible.

Syntax

PlanarSketch.Visible() As Boolean

 

For the second task you can check the name of the sketch via the name property here

Syntax

PlanarSketch.Name() As String

 

Here is the VBA sample to set all sketches visible or not so you can adapt to filter the named sketch as required. 

 

If this solved a problem, please click (accept) as solution.‌‌‌‌
Or if this helped you, please, click (like)‌‌
Regards
Alan
0 Likes