Renaming sketch variable (by selecting them from the sketch)

Renaming sketch variable (by selecting them from the sketch)

RoyWickrama_RWEI
Advisor Advisor
570 Views
2 Replies
Message 1 of 3

Renaming sketch variable (by selecting them from the sketch)

RoyWickrama_RWEI
Advisor
Advisor

With I started to doing with iLogic, I keep getting more and more problems (or needs). To go through my modelling at hand, I need to rename sketch variables as they need. Using an ilogic, is there a way to pick these required variables from the sketch and then to rename (in a text box available) one by one?

 

Please help. Thanks

0 Likes
Accepted solutions (1)
571 Views
2 Replies
Replies (2)
Message 2 of 3

rjay75
Collaborator
Collaborator
Accepted solution

This will rename a sketch dimension.

 

1. Select the dimension.

2. Run the rule

 

Rule Code:

 

Dim oSelect As SelectSet
oSelect = ThisApplication.ActiveDocument.SelectSet

If oSelect.Count = 1 Then
    sd = oSelect(1)
    If TypeOf sd Is DimensionConstraint Then
        newName = InputBox("Enter New Name:", "Rename Dimension", sd.Parameter.Name).Trim()
        If Not String.IsNullOrEmpty(newName) Then
            sd.Parameter.Name = newName
        End If
    End If
End If
Message 3 of 3

RoyWickrama_RWEI
Advisor
Advisor

I am sorry: I missed to accept this as solution before!

0 Likes