Community
I have a part with four sketches in it.
I also have a multi text parameter with four letters.
If parameter "A" is active I want to make sketch1 visible.
If parameter "B" is active I want to make sketch2 visible etc.
I have downloaded several codes but not work as I want.
Can someone help me get started.
Solved! Go to Solution.
Solved by rossano_praderi. Go to Solution.
Hi Jos,
this is my example as your solution.
Dim sketches As PlanarSketches = ThisApplication.ActiveDocument.ComponentDefinition.sketches Dim oSketch As PlanarSketch For Each oSketch In sketches Select Case oSketch.Name Case "Sketch1" If TestParam = "A" Then oSketch.Visible = True Else oSketch.Visible = False End If Case "Sketch2" If TestParam = "B" Then oSketch.Visible = True Else oSketch.Visible = False End If Case "Sketch3" If TestParam = "C" Then oSketch.Visible = True Else oSketch.Visible = False End If Case "Sketch4" If TestParam = "D" Then oSketch.Visible = True Else oSketch.Visible = False End If End Select Next
Bregs
Rossano Praderi
Can't find what you're looking for? Ask the community or share your knowledge.