Hi everyone, there is part of my current research that needs to rename the name of each reference I created from Planex to x. Since the problem is hard to explain, I need to post the macro first.
here is the key part of the macro loop:
i = 1
Do While i <10
boolstatus = Part.Extension.SelectByID2("front plane", "PLANE", 0, 0, 0, True, 0, Nothing, 0)
Set RefPlane = Part.FeatureManager.InsertRefPlane(8, 1 * i, 0, 0, 0, 0)
boolstatus = Part.SelectedFeatureProperties(0, 0, 0, 0, 0, 0, 0, 1, 0, "????")
Part.ClearSelection2 True
i = i + 1
Loop
i = 1
As you could see, I am trying to create 9 reference planes with the macro(in the future there might be a thousand or more). However, the ???? should be the VALUE of i in each loop. But if I enter "i" simply, it will not work cause every plane will be renamed as "i" and the program will not accept this. So how could I express the real value of i in the ???? area?
This is a problem extremely hard to google for a beginner like me, sorry if the problem is too easy.
SolidworksApi macros