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: 

Renaming sketch variable (by selecting them from the sketch)

2 REPLIES 2
SOLVED
Reply
Message 1 of 3
RoyWickrama_RWEI
464 Views, 2 Replies

Renaming sketch variable (by selecting them from the sketch)

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

2 REPLIES 2
Message 2 of 3
rjay75
in reply to: RoyWickrama_RWEI

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
in reply to: rjay75

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

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

Post to forums  

Autodesk Design & Make Report