We are using SolidWorks 2007 SP2.2 and we are trying to write some custom code to be able to change the material codes we use in custom props. In our part models, we currently have a custom prop called 'matl'. In the value / text expression field we have code with a text prefix and then a link to a dimension or two. An example would be: MFB"D2@ snipped-for-privacy@A300107.SLDPRT"x"D1@ snipped-for-privacy@A300107.SLDPRT" We want to change this to B-SFB-304-"D2@ snipped-for-privacy@A300107.SLDPRT"x"D1@ snipped-for-privacy@A300107.SLDPRT"
We need to be able to maintain the parametric links to the dimensions and replace the text prefix. Any ideas on how we get to this field of the custom prop so we can copy it? As far as we can see, we can only read the evaluated value through the API.
Using VB6 and a dll called DSOfile.dll, we have managed to write a string with a parametric link string back to a custom prop, but we have to open the file in SW to get the evaluated field to update. Is it possible to update the evaluated field without opening the file in SW? We got DSOfile from here:
We need to be able to automate this process because we have approximately 140 000 files to change.
Any ideas?