Continue to Site

Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

  • Congratulations SSS148 on being selected by the Eng-Tips community for having the most helpful posts in the forums last week. Way to Go!

VB program to list parts in an Assm? 2

Status
Not open for further replies.

ScottWisker

Mechanical
Jan 31, 2007
15
Does anyone know of code that will list the components within an assembly without having to open the file?

Thanks
 
Replies continue below

Recommended for you

Wow, didn't know I was opening the Pandoras box with this one. For the record here's what I was doing with the code I originally requested.

I set up a basic VB exe that displays a form prompting the user for an assembly to start from and a new location. The overall goal is to copy and rename the assembly and referneces, but along the way I want to be able to pull specific components out (that I know I am going to modify). I've already written a program to do this via macro inside SW, but it's pretty slow and prone to lock-up.

I discovered that I could do the biggest part of the copying, renaming, and re-referencing without opening SW which makes for a much smaller and robust program. I just needed pointed in the right direction. (thanks Handleman)

Now the last thing I do is open the newly created and referenced files.
 
Bradley
I am using 06 Office SP3.4. Having some work done on the pc but want to upgrade to 07 after that is done.

 
Russell,
I am assuming that you are using SolidWorks 2006 Office professional. Why are you not using SolidWorks PDM to create as built or latest versions of your drawings?


Bradley
SolidWorks Premim 2007 x64 SP3.1
PDM Works, Intel(R) Pentium(R) D CPU
3.00 GHz, 4 GB RAM, Virtual memory 12577 MB, nVidia 3400
 
I am the only user so PDM really is not needed. There is a good directory structure here, just that there is alot of cross breeding. Previous users tried to keep a project in a single folder. Problem with that was that they would copy the part / drawing and change stuff like the finish but not the part number. So now you end up with the same parts in different directories with different finishes. In turn management / owner remembers the part from "Job A" when you may be working on "Job B". So in a scramble they pull the print from "Job A" send it out for finishing and then when it comes back the customer complains because the finish is wrong. Because we work on a JIT system shit rolls down hill and until i point out the error i am the idiot who does not check my drawings. Fortunatly they are starting to listen.
 
Russell,
I understand what you are saying about a one man shop. I would still setup PDM Works and use if I were the only one using it. There are several advantages, the biggest advantage is that you can pick any revision of any drawing with any date in time and print it as built. You know that revision is the same print as the revision from 7 years ago.
As for people copying the part / drawing and changing stuff like the finish but not the part number is a different issue all together. That is a big problem.


Bradley
SolidWorks Premim 2007 x64 SP3.1
PDM Works, Intel(R) Pentium(R) D CPU
3.00 GHz, 4 GB RAM, Virtual memory 12577 MB, nVidia 3400
 
Thanks for the Star.

Bradley
SolidWorks Premim 2007 x64 SP3.1
PDM Works, Intel(R) Pentium(R) D CPU
3.00 GHz, 4 GB RAM, Virtual memory 12577 MB, nVidia 3400
 
With the help of this forum and lots of trial and error my program is functioning as intended.
I have had a request to add the ability to change a specific dimension within an assembly to my program. Before I start down a path, is it possible to edit geometry such as dimensions defining reference plane location from the Document Manager without opening the file or have I reached the limit and must now add that code to first open the file, make the change, and then hand over control to the user?

Thanks to everyone that has helped thus far
 
I'm pretty sure that the document manager doesn't have the capability to change dimensions. The only workaround I can think of would be to use an Excel design table to drive a dimension based on a value stored in a custom property. You could change the custom property using document manager, but the dimension value would not be updated until the file is opened and the design table is updated.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor