Hi all,
Does anyone here do VBA programming for Solidworks (a 3-D CAD package)?
I'm working on a VBA application within Solidworks (SW 2006 sp 4.1) and am running into a problem.
I need to be able to find and list all of the external part and assembly file references within an assembly programmatically. Once I have a list of them I'll be able to manipulate the list as needed. The problem is that in an assembly file, using the SldWorks.ModelDocExtension.ListExternalFileReferencesCount method (or SldWorks.ModelDoc2.ListExternalFileReferencesCount2) returns a 0; and using the ListExternalFileReferences method to collect the reference info yields nothing. However, if I view the 'Find References' pull-down from within SW, it lists all of the references within that assembly.
If I create a part A part file, and a part B part file; then insert part B into part A and save part A as a part file and use those methods, they do return a count >0. However, as soon as I create an assembly of the part A part file (with part B inserted), I again get a 0 count using those methods.
Are there other methods that need to be used on an assembly?
Thanks,
Dan
Does anyone here do VBA programming for Solidworks (a 3-D CAD package)?
I'm working on a VBA application within Solidworks (SW 2006 sp 4.1) and am running into a problem.
I need to be able to find and list all of the external part and assembly file references within an assembly programmatically. Once I have a list of them I'll be able to manipulate the list as needed. The problem is that in an assembly file, using the SldWorks.ModelDocExtension.ListExternalFileReferencesCount method (or SldWorks.ModelDoc2.ListExternalFileReferencesCount2) returns a 0; and using the ListExternalFileReferences method to collect the reference info yields nothing. However, if I view the 'Find References' pull-down from within SW, it lists all of the references within that assembly.
If I create a part A part file, and a part B part file; then insert part B into part A and save part A as a part file and use those methods, they do return a count >0. However, as soon as I create an assembly of the part A part file (with part B inserted), I again get a 0 count using those methods.
Are there other methods that need to be used on an assembly?
Thanks,
Dan