Thanks for this very useful macro! Can you please help how can I select dimensions of a part in an assembly without select any other thing? Also i'm getting error when i select more than one dimension (runtype error 13 type mismatch) "ConfiguratorForm.Show vbModal" marked yellow. Thanks in advance.
woooow this was exactly what i was looking for! Will use this for a future project for my company, so the older people can understand my parametric model haha!
While this is neat as beans, I'm curious, what's the advantage of this over just using the already built in equations manager? You could set up global variables and have dimensions point to those. A user pops open the equation manager and updates what he/she needs, clicks ok, and you get the same result. Correct?
Hello Benjamin, thank you for the questions and apologize for the delay in answering you. In general, Yes, it is possible to use Equations. But there are few advantages of this macro over equations, e.g. you can edit configuration of sub-components directly from the context of the assembly (you need to activate the model in its own window to work with Equations); the input is cleaner as Equations will bring the dialog with all equations and usually you will have dozens more in there and it may be hard to navigate; finally this macro changes the dimensions in the current configuration (or referenced configuration of the component) so it is possible to have 2 instances with different values while equation will be applied in all configurations when selected for sub-component). I was asked similar question several time so create a benefits table comparing to other popular methods: www.codestack.net/solidworks-api/document/macro-feature/configurator#benefits-comparison
Hello, this is an amazing tool. I am currently trying to create something similar. Are you still active here? Do you perhaps have a discord where one could ask questions about your work? I am trying to create something similar but with more calculations in the background (I am building a configurator for a specific product, but I have reached the maximum I can squeeze from Solidworks equations without crashing). Using nested ifs as a substitute for loops has proven itself to not be reliable way to achieve what I want to do, but I think the macro way could work. Is there any possibility of asking you some questions about this? Cheers
Thank you. There is a discord channel for xCAD.NET (library for add-ins development): xcad.net/ (chat link in the top left corner). You can also contact me by e-mail: info@xarial.com
@Xarial my machine displaying error given below while running same code .Can u Plz help me. Dim lblParamName() As Label compile error: user defined type not defined.
So, I have various dimensions comming from a sampling algorithm in python, and want to update SW from those sampling results. This means, my python array should update the dimensions of solidworks and save the part. Any thoughts on how can I do this?
You can use IModelDoc2::Parameter API to get the pointer to dimension and set its value. Example: www.codestack.net/solidworks-api/getting-started/scripts/power-shell/model-generator/
Can this be used to drive global variables and configurations? Suppress and unsuppress components in an assembly? Also, can inputs be from a list rather than typed by user?
Hi John, yes, this is possible but this is pushing the boundaries of the macro. I would use add-in for that. I will be releasing commercial tool in several months allowing you to do design automation, e.g. custom property pages for input, excel-like formulas with ability to use dimensions, custom properties, suppression states etc. for the calculation. if you are interested, please contact me via info@xarial.com, I can share the demo video with you.
This macro now supports assemblies
Thanks for this very useful macro! Can you please help how can I select dimensions of a part in an assembly without select any other thing?
Also i'm getting error when i select more than one dimension (runtype error 13 type mismatch) "ConfiguratorForm.Show vbModal" marked yellow.
Thanks in advance.
woooow this was exactly what i was looking for! Will use this for a future project for my company, so the older people can understand my parametric model haha!
While this is neat as beans, I'm curious, what's the advantage of this over just using the already built in equations manager? You could set up global variables and have dimensions point to those. A user pops open the equation manager and updates what he/she needs, clicks ok, and you get the same result. Correct?
Hello Benjamin, thank you for the questions and apologize for the delay in answering you. In general, Yes, it is possible to use Equations. But there are few advantages of this macro over equations, e.g. you can edit configuration of sub-components directly from the context of the assembly (you need to activate the model in its own window to work with Equations); the input is cleaner as Equations will bring the dialog with all equations and usually you will have dozens more in there and it may be hard to navigate; finally this macro changes the dimensions in the current configuration (or referenced configuration of the component) so it is possible to have 2 instances with different values while equation will be applied in all configurations when selected for sub-component). I was asked similar question several time so create a benefits table comparing to other popular methods: www.codestack.net/solidworks-api/document/macro-feature/configurator#benefits-comparison
cad+ tools u used was it free or need to pay? if free, when can i download it?
Hello, this is an amazing tool. I am currently trying to create something similar. Are you still active here? Do you perhaps have a discord where one could ask questions about your work? I am trying to create something similar but with more calculations in the background (I am building a configurator for a specific product, but I have reached the maximum I can squeeze from Solidworks equations without crashing). Using nested ifs as a substitute for loops has proven itself to not be reliable way to achieve what I want to do, but I think the macro way could work. Is there any possibility of asking you some questions about this?
Cheers
Thank you. There is a discord channel for xCAD.NET (library for add-ins development): xcad.net/ (chat link in the top left corner). You can also contact me by e-mail: info@xarial.com
@Xarial my machine displaying error given below while running same code .Can u Plz help me.
Dim lblParamName() As Label
compile error: user defined type not defined.
Hi Artem, great work! Thank you)!
Hello, really good work. Thank you very mutch!!
As always... damn sweet!
Thank you, Paul!
So, I have various dimensions comming from a sampling algorithm in python, and want to update SW from those sampling results.
This means, my python array should update the dimensions of solidworks and save the part.
Any thoughts on how can I do this?
You can use IModelDoc2::Parameter API to get the pointer to dimension and set its value. Example: www.codestack.net/solidworks-api/getting-started/scripts/power-shell/model-generator/
Can this be used to drive global variables and configurations? Suppress and unsuppress components in an assembly?
Also, can inputs be from a list rather than typed by user?
Hi John, yes, this is possible but this is pushing the boundaries of the macro. I would use add-in for that. I will be releasing commercial tool in several months allowing you to do design automation, e.g. custom property pages for input, excel-like formulas with ability to use dimensions, custom properties, suppression states etc. for the calculation. if you are interested, please contact me via info@xarial.com, I can share the demo video with you.
@@Xarial Hi. I have sent you an email about your addin that you mentioned above. Could you please return if possible. Thanks in advance.
Thanks a lot! Is it possible to make one for assemblies?
Yes, it is on the list. Reference: github.com/xarial/codestack/issues/22