When I am on the SmartProperties of several welded bodies, I use a counter that allows me to number them from 001 to 0XX.
My problem is as soon as I change the Part file and I do the manipulation again, the counter does not start from 0, I am forced to reset the counter manually.
I want to know if the automation of this reset is possible according to a variable property between 2 files.
To overcome this problem I created a small *.BAT file that overwrites the *.xml file of the counter (here SmartCounter_Num-mecanosoude.xml) by a copy whose increments start from ZERO.
I call this file (*.bat) via a button in my Smartproperties.
I had read these forums but I can't get my way. This is because the counter resets to 0 when a property in the part file is changed. However, in my case, I want a reset as soon as the file is different.
Regarding the macro @Maclane, did you just do that? Or do you have other steps? I don't understand how you do it exactly. Could you clarify or rephrase please?
I copied a first xml from a counter with the " Zero " increment values. (StartValue=0) => that I called Smartcounter_Num-mechanical-welded-RAZ
I use a second *.xml " Classic " counter to add the increments on my properties: =>Smartcounter_Num-mecanosoudé.xml
And the *.bat file for resetting to Zero is used to replace the file of the counter used (Smartcounter_Num-mecanosoudé.xml) by the one whose starting value of the increment is zero (Smartcounter_Num-mechanically welded-RAZ)
… The Smartcounter_Num-mechanically-welded-OLD file is a backup copy of the Smartcounter_Num-mecanosoudé.xml file