change configuration specific propertys by macro

Hey all,

Question,

On the configuration specific tab I've got a variable "ArtikelNr" with a defined value.

Since migrating to SW2009 SP5 we want to changes the property names.

example : property ArtikelNr becomes B-sw-article. Or the value from  ArtikelNr needs to be the places at B-sw-article

When this is done the old property ArtikelNr is obsolete and should be deleted.

Totally it's needed for three propertys

Note: it's a configuration specific where there are up to 100 configurations who need to be converted as since the BOM on the drawing displays nothing since the new property is still empty.

Is there any macro availeble who can do this trick? I've found some macro's at this forum but most look like just adding custom prop.

With all kind regards.

Ed

SolidworksApi macros
Answers 6
ML
ML 2010-10-27 Best Answer
SF
SF 2010-10-27

Markku,

Thanks for the quick response.

It works fine at first try, I can also change the value besides the property names.

Because of the excel based tool I can also see what I am doing.

Very nice !!

I have to test more, with derived configs, but those are not that common in our database.

Now I just need something to delete the old property names of the changed configurations.

greetings

Ed

ML
ML 2010-10-27

Unused attribute names should be deleted by the code when writing data into the files if the attribute value is set to empty. So, when writing attributes, use all 6 attributes, just make sure the values for old attributes are empty. If that doesn't work, let me know...

br

Markku

SF
SF 2010-10-27

It's working all right.

Still a bit handlabour but less than doing it manually while still  keeping in control.

Does it function with more than 6 attributes?

Thank you very much.

With all kind regards,

Ed

ML
ML 2010-10-27

"Does it function with more than 6 attributes?"

Sure, just define it in D3 cell, read with 3 attributes and write with 6.

SF
SF 2010-10-27

I ment read with 3 and write with 9, because of emptying older properties.

I tested it, worked Ok

grt.

Ed