[HELP] Creating a 3D configurator

Hello everyone,

As part of a project, I want to create a 3D configurator in SolidWorks. While rummaging around on the internet I discovered this forum and I hope that some people will be able to help me because unfortunately I am no longer moving forward on this project ... Let me explain my problem:

I want to create custom assemblies a bit like when you go to configure your car at the dealership. In my case, it is a question of creating a configurator on an assembly with 3 key parts: A tap (10 types of taps possible), a basin (6 or 7 types possible), and a last part that I would not specify for confidentiality reasons (10 types of parts).

I created a bunch of configurations on an assembly that currently only includes faucets and basins in order to have a basis to practice creating this configurator. In the idea, I would like my user to select via a drop-down menu his tap, his basin and the last mystery part and that the assembly in the configuration selected by it is displayed.

I started using DriveworksXpress for this project but I'm very limited when it comes to configurator rules... In other words, I know how to create the forms but it is impossible for me to generate an assembly at the end, my rules being totally wrong.

I also saw that it was possible to carry out this project using a VBA macro under SolidWorks, again I don't have any programming skills (I can force myself to learn of course). I think the best solution would be DriveWorks for me, what do you think?

Could you help me by giving me for example a generic rule to indicate in DriveWorks that I would adapt according to the name of my configurations and my parts?

In the case of a VBA macro, have any of you ever faced this kind of problem? Do you have any examples to suggest to me?

Thank you in advance for your help

 

PS: I'm doing the project in SolidWorks 2010 ...

 

 

 

Driveworks is indeed a good choice (it's typically made for that)

Without starting with this kind of module, a good old family of parts in excel should be able to give you the result you expect (if for example you insert all your parts in an assembly and you manage the deletion/deletion states by excel).

The interest of excel is also to be able to make links with external excel files (or databases), to be able to add a second sheet to control your sheet containing your family of parts (would allow you to do something more user friendly with drop-down lists for example...).

Excel also allows you to do calculations / verification to prohibit configurations, set rules...

At the limit Excel is able to generate your 10*7*10=700 different configurations if you really need them (it may grind a little though...).

1 Like

Hello

Try to contact http://www.lynkoa.com/membres/thomasguillard

Here is his profile

IFMA mechanical engineering training. I have been using solidworks on my own since I was 14 years old and I learned Catia at school. Now an engineer at DriveWorks, a SolidWorks Gold Partner that allows you to automate your SolidWorks designs and provides you with a 3d configurator and sales. http://www.driveworks.co.uk/

Here's what to compare the versions of DriveWorks

http://www.driveworks.co.uk/products/compare/

@+ ;-)

1 Like

Thank you very much for your answers! 

I'm going to contact the person for some explanations about DriveWorks! 

In the same way, I would also try it with Excel. I actually want to control the state of deletion of the parts according to the desired configurations! I'll keep you posted if I ever get there! 

Thanks again 

 

If other people have suggestions, don't hesitate

1 Like

Hello

DriveWorksXpress is free but limited, DriveWorks is paid but much more advanced.

If you have a good knowledge of Excel you can create the configurator of your dreams without any problem. The question is do you have a good knowledge of Excel?

may the force be with you.

 

 

3 Likes

Under DriveworksXpress, you need to select one of your components and then go to Drawing & Configurations, check the box: 'Yes, let me create a rule to change the configuration'. Then in the rule editor you create a rule on the config. If, for example, in your form you have a multiple choice TypeofTap with Tap A, Tap B, Tap C. your rule can be for example:

=IF(FaucetType="Faucet A", "Faucet Config A", IF(FaucetType="Faucet B", "Faucet Config B","Faucet Config C"))

And the same goes for the washbasin and the mystery component.

You can mix several criteria of the form to choose your config using AND() and OR()

2 Likes

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