Hello,
I would like to translate a series of file from different languages to English. I wrote a macro for that purpose. It changes the name of each feature and tree item.
The macro works ok except when it comes to change the name of a few folders like ‘sensors’ , "Lights, Cameras and Scene" and “Material”. I use the method ‘.SelectByID2’ that requires as first parameter the name of the tree item to be selected then the method ‘.SelectedFeatureProperties’
For the case of the ‘sensors’ folder, when I record the change of the name I get a code like this:Set Part = swApp.ActiveDocboolstatus = Part.Extension.SelectByID2("Unknown", "BROWSERITEM", 0, 0, 0, False, 0, Nothing, 0)boolstatus = Part.Extension.SelectByID2("Unknown", "BROWSERITEM", 0, 0, 0, False, 0, Nothing, 0)boolstatus = Part.SelectedFeatureProperties(0, 0, 0, 0, 0, 0, 0, 1, 0, "test")
There is twice the line boolstatus = Part.Extension.SelectByID2("Unknown", "BROWSERITEM", 0, 0, 0, False, 0, Nothing, 0) because I double click to change the name of the folder.
When I try to change the name of the ‘sensors’ folder again programmatically, I can’t select the ‘sensors’ folder even when I provide the right name to the method .SelectByID2boolstatus = Part.Extension.SelectByID2("test", "BROWSERITEM", 0, 0, 0, False, 0, Nothing, 0)‘boolstatus is false and the folder is not selectedboolstatus = Part.SelectedFeatureProperties(0, 0, 0, 0, 0, 0, 0, 1, 0, "NewName")
Also for the ‘Surface Bodies’ and ‘Solid Bodies’ folders, I can select programmatically the folders and then change their names but you can’t see the changes, even after an update or a save. See the picture I enclose.
Does anyone know a pass-by to this problem.
Many thanks,
Charly
PS: I sent a similar email to the api support but I didn't get any news from them