hey guys,
i have some problem with the replace function of the document manager api.
i tried the following:
var r = refObject.ExternalReferences;
if (r != null)
{
foreach (var s in new List(r))
{
var find = document.Children.Find(x => x.Source.ToLower() == s.ToLower() || x.Destination.ToLower() == s.ToLower());
if (find == null)
continue;_document.ReplaceReference(s, find.Destination);
}
}
_document = ISwDMDocument15
I search fpr External References and the i look up in my object (document.Children) if i have a new path of the reference.
If i have some new one then i tried to replace the reference.
Example:
old: C:\\Work\\test.sldasm
new C:\\Check\\test_123.sldasm
The new on is the same file like the old on but has a new filename. The Problem is that the function works correctly under windows 7 x64 but when i try it under windows xp x86 then i get
a com exception
if i run the _document.replacereference function.
have some on an idea for the problem?
with greetings
Daniel
SolidworksApi macros