ilogic code to make Text style not visible

ilogic code to make Text style not visible

Anonymous
Not applicable
475 Views
1 Reply
Message 1 of 2

ilogic code to make Text style not visible

Anonymous
Not applicable

Hi all

 

I am trying to create a rule that if a certain property is set to Gx then certain text on a template becomes invisble.

 

I have created a Text style and thought the following code would suffice....

 

Format:HTML Format Version:1.0 StartHTML:     165 EndHTML:    1942 StartFragment:     314 EndFragment:    1910 StartSelection: 314 EndSelection:     314
SyntaxEditor Code Snippet

Ifz_ValueS="Gx"Then
ThisDoc.Document.StylesManager.Text("Standard").Visible=FalseEndIf

But alas it does not work. I guess I could create the text using layers and make the layers invisible but if anyone knows of the correct code or even is it possible.

 

Thanks

 

Gareth

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

Vladimir.Ananyev
Alumni
Alumni

TextBox object has Layer property that gets and sets the layer associated with this object.

You may turn layer on or off changing  Layer.Visible property.

See also  “Moving sketch entities to a new layer API Sample “ in the Inventor API Help.

Cheers,


Vladimir Ananyev
Developer Technical Services
Autodesk Developer Network

0 Likes