Reply

Occurence.Replace methode for part with family members

[ Edited ]

Hi,

 

I've written a program to automatically change any lost links for occurences in an assembly, using the Replace method. This works fine, for normal parts and subassemblies, but not for part with Family Members. If I call the replace method I get a FileNotFoundException although I'm certain I'm using the correct file name.

 

Although it seems strange to me I'm getting this FileNotFound error, I also noticed there is an extra argument for this function which is related to family members, but I don't understand how to use this argument. I expected it to be a string with the member name, but it is an 'object'.

 

SubReplace ( _ NewOccurrenceFileNameAsString, _ ReplaceAllAsBoolean, _ NewFamilyMemberNameAsObject _)

What am I doing wrong? Could you give me an example how to use this function for parts with family members?

 

 

Posted by: Hendri Verveda
Post date: 11/21/2011 3:06:12 AM

2 REPLIES

RE: Occurence.Replace methode for part with family members

[ Edited ]

Is there no one who can help me with this?

 

Posted by: Hendri Verveda
Post date: 11/22/2011 9:29:09 PM

RE: Occurence.Replace methode for part with family members

[ Edited ]

I've found the cause of the 'File not found' exception. As it turned out this is caused by the original file not being found! However... the reason I'm replacing is that the old file does not exist any more! Also, with a normal occurrence (not being a Family Of Assembly) this is not a problem at all, only with a FAO. It almost seems to be a fault in the API!

 

Any thoughts? Is this a bug?

 

Posted by: Hendri Verveda
Post date: 12/11/2011 8:13:55 PM