Hi all!
In my eternal search for complexity and in order to facilitate the use of a tool for others, I try to make a small "module" in VBA so that in a single data file, the coin odds on SW change.
To do this, I obviously started by doing tests on a single part.
I created a room family table and therefore set the desired dimensions by creating two lines: "origin" and "modifiable"
So I created my data file, with the original dimensions of the parts (In case they are forgotten by dint of changing them!)
On this one, I also created a button, with the following VBA command in it:
[code] Sub Changement_cote()
Workbooks.Open ("Test-Workbook.xlsm")
'Modification
Workbooks("Test-Workbook.xlsm"). Worksheets("Sheet1"). Range("B4"). Value = "='[Database.xlsm]Sheet1'!$B$4"
Workbooks("Test-Workbook.xlsm"). Worksheets("Sheet1"). Range("C4"). Value = "='[Database.xlsm]Sheet1'!$C$4"
Workbooks("Test-Workbook.xlsm"). Close 'Closing Test File
Workbooks.Open ("00-XXXXX-0-Came.xlsx") 'Family Room
'Modification
Workbooks("00-XXXXX-0-Came.xlsx"). Worksheets("Sheet1"). Range("B4"). Value = "='[Database.xlsm]Sheet1'!$B$4"
Workbooks("00-XXXXX-0-Came.xlsx"). Worksheets("Sheet1"). Range("C4"). Value = "='[Database.xlsm]Sheet1'!$C$4"
Workbooks("00-XXXXX-0-Came.xlsx"). Close 'Closing Test File
End Sub[/code]
For the moment I haven't added the auto' backup of the files, but they ask me to, and I also see the change on the files that didn't use the "updatescreen=false" =)
So my problem comes later. I reopen solidworks after making my modification, and the part family unfortunately does not update, despite the fact that its file is up to date. I have to go through "edit part family" for it to update
(during this operation I only do "edit family" and I quit, solidworks seems to go and get the file)
Would there be a VBA command allowing this update to do so automatically?
Because this is only a room, it's not a problem. But for a complex assembly containing only 20 parts, it may become a long ^^'
Sorry for the pavement and the inconvenience,
Hoping to find a solution ^^"
Friendly
Yoann
base_donnee.jpg