-
Re: Macro: Add a custom property & link it to a current custom property
JOHN GEORGE Sep 22, 2016 10:23 AM (in response to Cad Admin)Look at this discussion and you can modify to match your needs
Hope this helps
-
Re: Macro: Add a custom property & link it to a current custom property
Cad Admin Sep 22, 2016 10:37 AM (in response to JOHN GEORGE)John,
I have no problem adding predefined custom properties. My issue is the "value/text expression" for a new property i want to equal an already existing one. Manually within the model i would generally input the new variable value of $PRP:"old value" and it worked fine.
Now I'm trying to do the same thing through a macro (have about 16 properties to link) and the macro doesn't like the "$PRP:"old value" in the code.
-
Re: Macro: Add a custom property & link it to a current custom property
John Stoltzfus Sep 22, 2016 10:54 AM (in response to Cad Admin)The macro reads all your current custom properties if you want it to or just the ones you need to change and compiles it in an excel file in the search columns you specified, then you could add the "New" custom property in a new column and do the =D2..... once the new custom property is listed in the excel file you can force write it back to the part or assembly...
-
Re: Macro: Add a custom property & link it to a current custom property
JOHN GEORGE Sep 22, 2016 11:42 AM (in response to Cad Admin)I am not sure about "$PRP:DRAWNBY"
If you want to get that property, that should have given with a value
In your case, you are trying to just replace only the property name, not the value (if I am correct)
You can modify that code from Ioannis Skarlatakis and should work, I think
-
Re: Macro: Add a custom property & link it to a current custom property
Cad Admin Sep 22, 2016 11:49 AM (in response to JOHN GEORGE)John,
I've used the excel from Ioannis Skarlatakis before. Works great. My application i have a set of drawings that are already done. My sales guy informed me that the deliverable to our NEW customer is that it be on their forms and populate their titleblocks and so on. My best solution is to Batch swap out the forms and run a macro to create the defined variables and link them to our original ones. I don't want to replace ours as our design is sold to MANY customers.
As always thanks for the help and solutions...
-
-
-
-
Re: Macro: Add a custom property & link it to a current custom property
John Stoltzfus Sep 22, 2016 10:26 AM (in response to Cad Admin)Try the attached macro written by Markku Lehtola - it is an Excel file so you should easily be able to add a column and write it back to the files that you want to change....
-
Re: Macro: Add a custom property & link it to a current custom property
Christian Chu Sep 22, 2016 10:53 AM (in response to Cad Admin)Seems like there is a syntax error in your code (double quote) for drawnby
-
Re: Macro: Add a custom property & link it to a current custom property
Cad Admin Sep 22, 2016 11:40 AM (in response to Cad Admin)-
Re: Macro: Add a custom property & link it to a current custom property
Christian Chu Sep 22, 2016 11:57 AM (in response to Cad Admin)Bingo !
-