[HELP] Creating a 3D configurator

Hi all

c.fer has already given a very good answer but I will give you links to the SOLIDWORKS online help for more info.

To control the configuration of a part in DriveWorksXpress, you need to capture its configuration:

http://help.solidworks.com/2016/french/SolidWorks/driveworksxpress/t_enabling_config_switching_driveworksxpress.htm?id=69298c72fbe143a08d63cbb1b214d6c3#Pg0&ProductType=&ProductName=

Next, the following article shows how to change the configuration of a template based on a form control:

http://help.solidworks.com/2016/french/SolidWorks/driveworksxpress/c_rule_type_configuration_driveworksxpress.htm#pcj1450463090964

Hope this helps, if not feel free to ask for more info!

1 Like

Thank you very much for your answers! Regarding the c.fer rule I tried with 2 configurations and it works! So I'm going to continue on DriveWorks but I haven't said my last word lol. As you talked about managing my configurator via Excel, I'd like to do it too, just to master both possibilities. 

Unfortunately I don't master Excel perfectly... Do you have any examples of files that you have already made? Or give me an example to manage a configuration a bit like c.fer did but via Excel? 

Should I create the Excel file and then link it to my assembly or create an automatic part family table and then manage it? And what are the steps to follow to do so? 

If you had a small example of an Excel file with two or three pieces forming an assembly, it would be perfect...  

Thank you again for your answers! This forum is really great 

1 Like

Hello

I'm on sw 2017 so it's going to be difficult to exchange files.

But I made  a doc with explanation.

If you have any questions , don't hesitate.

may the force be with you.

 

 

 

 


configurateur_3d_excel_par_obi_wan.docx
2 Likes

Hello

There are answers for DriveWorks and for Excel, so here is one in VBA macro to complete.

To use the join macro, you must first open 1 assembly in Solidworks consisting of 1 to 3 parts with different configurations. When the macro is launched, it notes the names of the rooms and their configurations, when the form is displayed, you have to choose the configuration for each room and then click on the "configure" button.

This macro is only an example and, as such, does not contain all the necessary checks and error handling.

This macro is written in SW 2017, so make sure to change the references in the macro editor if necessary.

Kind regards


macroconfig.swp
2 Likes

Many thanks to OBI, d.roger, thomas, cfer and gt22 for your answers. I have quite a few leads that I will exploit thanks to you. I'm going to work on it properly this week. I will get back to you by next Friday with I hope good news. In any case, I'm happy to see a community like this! Mutual aid is the key to any project!

Thanks again

1 Like

D.Roger, I just tried your macro. It opens without any problem however I have a small question. In fact, my faucets have no geometric connections to each other. They are all different parts with totally different geometries. The same goes for the basins and for the room that I won't specify.

Basically, I created configurations in my assembly with faucet 1 and sink 1, faucet 2 and sink 1 ect ect ...

How can I adapt your macro to my needs, for example?

The configs are all present in my tree, I just want to manage the deletion state of my parts.

Basically, the idea is from your macro, I choose my faucet via a drop-down menu with all my faucet parts, I then choose my basin in the same way and finally my 3rd piece and presto, the assembly is generated.

I don't have much knowledge of programming...  

Thank you in advance for your help

Hello

Indeed, seen like this, the macro takes another turn.

Do your types of parts have a common point by family, let me explain, do the names of your taps all start with "R", the names of your basins with "V" and the name of your mystery pieces with "M" (or other of course), this would allow when analyzing the threaded elements of the assembly to classify each piece in the right category. From there, you just have to hide or show the elements of the tree according to the user's choice, there are functions in the APIs that allow you to do this.

Kind regards

1 Like

D.roger, 

Yes, my taps all start with R, the Basins also start with V, the mystery room follows the same logic. In my assembly tree, I have stored the faucets in a folder called faucet, the same for the basins. 

What are these functions you are talking about? Do you have an example of a macro that handles this? Should I leave the folder for each family in my assembly tree? 

Thank you again for your help 

Kind regards 

PS: If you wish, I can transfer the assembly to you. 

1 Like

Ok,  I'd like you to transfer the assembly to me (even with empty parts for the sake of confidentiality). Having availability at the moment,  I'm going to give you an example of a macro tomorrow or Monday at the latest.

Good night.

Kind regards

2 Likes

Hello Slim,

If for privacy reasons you are afraid to transfer the files you can send them in private message to d.roger. I have also already done this via Wetransfer, just send the link in a private message by clicking on his nickname.

1 Like

Ac cobra , 

Has it already been done:) 

Thank you! 

Kind regards 

2 Likes

Hello
Here is a basic macro that allows the user to select the different elements in order to display them or not, configurations on the assembly are not necessary.
To keep the history of each configuration created, it is possible to add functions to check if the desired configuration already exists in the assembly, if so, to display it, if not to create it and then save the assembly. This is done using the following methods:
- http://help.solidworks.com/2015/english/api/sldworksapi/SolidWorks.Interop.sldworks~SolidWorks.Interop.sldworks.IModelDoc2~GetConfigurationNames.html
- http://help.solidworks.com/2015/english/api/sldworksapi/SolidWorks.Interop.sldworks~SolidWorks.Interop.sldworks.IModelDoc2~ShowConfiguration2.html
- http://help.solidworks.com/2015/english/api/sldworksapi/SolidWorks.Interop.sldworks~SolidWorks.Interop.sldworks.IConfigurationManager~AddConfiguration.html
- http://help.solidworks.com/2015/english/api/sldworksapi/SolidWorks.Interop.sldworks~SolidWorks.Interop.sldworks.IModelDoc2~Save3.html

Kind regards


configurator.swp
3 Likes

Another great job by Mr Roger the demigod of macro ;-)

On the macro managing the configurations, it must surely be possible to modify it so that it becomes "generic" by doing the same thing but for an assembly containing x parts (or parts and subassembly) right?

So modified in this way it could be used by many more people (I would love to have assemblies limited to 3 parts ...). It would then become a very user-friendly assembly configurator (no need to click on each part in the tree to be able to change (or not) the configuration)

2 Likes

Being taken by feelings ;-) , I'll look into the subject and see what I can propose, the most complicated may be to put a little more in the vba (sniff), I who follow more comfortable with the C#.

Kind regards

4 Likes

Hello

To follow up on the froussel request, you will find HERE a program to manage the configurations of all the components of an assembly from the latter. As a bonus, you will also be able to manage the display or deletion of these components in the assembly as well as the setting to exclude from the bill of materials.

Not having found all the information I wanted in vba, I fell back on the C# language, I attached a small macro to launch this program  through Solidworks, you just have to call this macro via a new button in Solidworks as it is done for every macro.

Kind regards

3 Likes

Thank you @ D.Roger

I haven't tried it but I don't doubt the relevance of the product

@+ ;-)

1 Like

I do, I have my doubts...

Because D. Roger does not indicate the side he has chosen:

The Force... / The Dark Side...

3 Likes

May the force be with you....

3 Likes

boouuhhhhh!

Laughing out loud

3 Likes

I confirm

May the force be with you:)

2 Likes