I have two pieces of code that work to make a take-home composition but I'd like to merge them to "mix" the actions performed.
In the text file "Folder choice", I can enter the path of the folder in which the pieces of the composition to be taken away should go and the name of the pieces remains the same as the original. That's what I want (maybe I'd add a suffix).
In the text file "Exclusion parts", I can exclude parts that contain a certain string in their name. On the other hand, I don't choose the destination folder and the name of the parts has nothing to do with the original one.
I therefore wish, via the two pieces of code, to be able to choose the destination folder of the parts while keeping their name and excluding those that contain certain characters.
Can you help me because I'm blocking?
I've tried several solutions (usually the macro runs fine) but I'm getting several results:
While continuing my research, I came across this page: http://www.forum-cao-3d.fr/api-questions/macro-de-composition-a-emporter-t11454.html
I managed to delete the increment that renamed the files but I am stuck on the part that allows me to select the recording folder of the composition to take away.
At the moment, a dialog box opens, I can select a folder but the files of the composition to take with you don't go to the selected one.
How do I "Save the result in a variable of type String"?
That's what I used but as it was stated in the other post, I thought there was another line to add after to retrieve the result of selecting the folder in the Windows window.
Indeed, the getfolder works since the folder selection window opens but it seems that the choice made is not saved since the pieces of the composition to take away do not go in the selected folder.
I'm thinking of closing the original file and then opening the one of the composition to go. On the other hand, I don't know how to go about finding the assembly in the folder selected by the GetFolder function.
Another problem is that before the take-away composition, the macro modifies part dimensions directly in the assembly (sketch dimensions and an extrusion value).
When I open the assembly of the take-away composition, the dimensions are the original ones. However, if I open the part where the sketch dimensions were changed, then the assembly updates. On the other hand, for the part where I modify the value of the extrusion, if I open this part the extrusion value is the original one.
Anyone have an idea to update the assembly (if possible avoiding keeping the basic assembly after the modifications)?