VBA: BOM Configuration

Hello

It's all in the title: I have the drawing of an assembly with several configurations to be done automatically by VBA/ API.

With the help of a VBA procedure I can select the view of my plan and select the configuration I want (e.g. 3 inch, 4 inch, ...). However, the configuration of the nomenclature does not follow ... I read on the internet that it was not related to the configuration of my view.

So I'd like some help to select my BOM and change the configuration under VBA.

The goal is to obtain, for example, a 3-inch assembly with the associated nomenclature.

Thank you

Guillaume.

ps: I use SolidWorks.

Hello Guillaume.

May I ask for a little more information, what is the context of your work?

Is this something you put in place to automate your designs?

If so, I'd advise you to take a look at a free product called DriveWorksXpress that's already available in SolidWorks.

http://www.driveworks.co.uk/products/driveworksxpress/?gclid=CJ_005OZ4cwCFRUW0wodrk8NvA

(the different Overview, Features and Benefit tabs should give you enough information)

For information, DriveWorks also offers the Solo and Pro versions, which have much greater automation possibilities.

Kind regards

Thomas

 

2 Likes

Hello Thomas.

Indeed, I want to semi-automate my design (some of the parts in my assembly are standard, the other is custom-made).

The goal is to obtain plans with automatic annotation (depending on the configuration) as quickly as possible.

So I first tried to set everything up by VBA which resulted in a fairly large excel with many bugs...

I then greatly reduced this excel using configurations in my CAD but I don't really know how solidWorks configurations work.

I'm going to find out about DriveWorks but I think it's quite complicated to set up for my case.

I only have one simple problem: the config of my nomenclature is not linked to the config of my view.

It seems to me that changing the configuration of this nomenclature using 3 VBA lines is the simplest solution.

Ps: an info I forgot to mention, we use ePDM.

Hello

Normally, the BOM is linked to a view, and when this view changes the nomencalture chanage.

If you change all the views of your drawing by hand, your nomencalture, change well, don't you?

Don't forget to rebuild the document after each configuration change with CTRL Q!

Hello PL,

Precisely that's my problem and it seems to me that it's solidworks that is like this: my nomenclature is linked to my eyesight well; Only the configuration of the BOM is not related to the configuration of the view.

I am forced to modify the configuration of my view and then that of my nomenclature to have a fair plan ...

I'd have to find a way to link the two or to do it in VBA, but impossible to modify the configuration of an array by VBA ...

Looking at the properties of the view or BOM (with a right-click), there is not an option to link the BOM and the view?

Unfortunately not...

Maybe a future improvement of SolidWorks?