Writing External File References!
Writing External File References!
(OP)
I was wondering if anyone knows of a way to write to SolidWorks external file references. I know there is a way to ListExternalFileReferences2 but I have not found a way to actaully write to them. I am trying to mimic the File, Save As, References..., Edit Referenced File Locations. I want to be able to write a program to automatically save files that are incontext anyway I want.
Thanks.
Thanks.






RE: Writing External File References!
Look in API help for ModelDocExtension::ListExternalFileReferences
SA
RE: Writing External File References!
RE: Writing External File References!
RE: Writing External File References!
I have also tried ReplaceReferencedDocument and that doesnt change the ModelPathname (refereing to the example Get External References).
SolidAir you mentioned in another thread about having documentation on SolidWorks Document Manager API's? Is there any way I can get it.
I also know that 2007 is going to offer the Document manager API in the standard API file but right now I am trying to figure a way to do this in 2006. Any help?
RE: Writing External File References!
RE: Writing External File References!
The Command swApp.CopyDocument in their "Copy Document and Its Dependencies Example" will copy an assembly and its in-context parts but if you rename the assembly all of the parts will be out-of-context. The swApp.CopyDocument will allow you to rename the parts but not the assembly.
Maybe it would help if I described the assembly I am trying to copy and rename. I built a part say a cylinder and inserted it into an assembly. Then in that assembly I Insert, Component, New part and choose the right plane. Then exited the sketch that it automatically creates. Then I copied a surface (offset surface 0) thickened it and then turned it into a sheet metal part. I will create several more parts for all of the surfaces of the cylinder. The first part that is a cylinder is the driving part of my assembly. Which is why when I copy an assembly over I want all the parts to be in-context so I can change the dimensions of the cylinder and all the sheet metal parts will update.
Any help on how I can accomplish this?