Control the part material from a custom properties form

Hi all

How do I drive a material from a custom properties form on SolidWorks?

I insist on the fact that I want to control the material from the form and not through configurations or families of parts.

I can control my piece very well with numerical values such as dimensions, etc... On the other hand, I can't manage to drive non-numeric values (possible in Inventor by setting the parameter to "nd" (undefined).

The objective is to be able to select the material in the form to control the material of the part.

Thank you for your help,

 

From the Property Form Editor :

You name a "Matter" property to which you assign [SW-Material]

 

 

 

3 Likes

flegendre offers to recover the material defined in the model.

To do the opposite (which is your request if I understand correctly), you can define a list (list object in the form editor) but on the other hand I don't know how the template could retrieve this value.

2 Likes

Indeed I didn't understand the question well!!!

That's what I use.

 

A questionnaire, with a drop-down list of the main subjects I use.

Take the @flegendre solution and add a drop-down list.

 

@+

 


matiere.png

@Bart ,

If you add a drop-down list on the Material property, there will no longer be a link with the SolidWorks Material and I think @Aurélien Fives wants to control the material database from the form.

1 Like

Hello

I'm just coming to bring my stone to the edifice :) .

In MyCADtools integration, one can assign a SW material. We did this to say for example: if my part has the document property "Material" = S 235, then SW Material = Custom Materials/Steel/S235 JRG2 (E24-2).

All this to say that when you choose a material text from a drop-down list, in the background  there is probably a way to affect the SW material. No?

The property editor is perhaps not "powerful" enough and you should turn to Smartproperties?

What do you think?

1 Like

Hi all 

That's exactly it, I can create the form and create the parameter very well, the big problem is to link it to my part.

I had thought of declaring a global variable to make the link between the custom parameter and the subject but apparently SW does not handle global variables other than numbers.

Thank you for these analyses, do you think the MyCadTools utilities act like macros? That is to say that the "Integration" tool would control the material from a VB parameter? In any case, Benoit, it's a good lead!!

Aurélien, Integration is not intended to run continuously. It's more for reprocessing files, doing mass operations. But the feature of assigning a SW material according to conditions works very well, I started thinking if we couldn't recover this feature by another means.

If we want to trivialize, Integration and other MyCADtools tools have the same roles as macros... but the comparison stops there: the MyCADtools tools are user-friendly, rather easy to set up and use, reliable, with instructions, serious assistance from the hotline,... In short, a sustainable solution.

If you do a macro, you'll have to make it reliable yourself, or ask a guy who knows about it. And when this guy leaves the company, you cry! :)

@jmsavoyat may contradict me... ;)

1 Like

Thank you Benoit,

The idea behind my question is not to use the MyCadTools utility which will not meet my needs but rather to understand how this %#§! of material parameter can be controlled via a form :) 

1 Like

I confirm,

 

By checking this morning, you just have to do as @flegendre.

 

And when you change the material in the questionnaire, the link is made with the play.

 

So no worries for me. We manage the material well via the form.


prop.png

@Bart, but it doesn't affect you a material in the Feature Manager, does it?

And that's what Aurélien wants to manage via a property.

2 Likes

Yes absolutely, the parameter does return the "value" of the material of the CAD part but does not change this material if we change the parameter

There is the DriveWorksPro utility that could do that: 

http://docs.driveworkspro.com/Topic/HowToDriveAPartsMaterial

But once again, the objective is not to go through a utility otherwise the simplest would be to manually change the material

I offer a "Fives" pen to the person who will find me the answer! (I test all the techniques...)

If you don't want to add an overcoat, you have to follow the use thought by SW:

  • Assignment of a material by the library in the Feature Manager (so data related to the material always good, density, strength, color,...)
  • Recovering the value of the material in a SW property
  • Escalating this property in the EPDM map.

I agree with you, it's not completely coherent to have a single data (which will end up on the 2D plane) that can't be controlled remotely, but unfortunately you have to live with it if you don't want to make a gas plant :/

And maybe you should also think about a particular case: do you ever have pieces that have 2 materials? Like a steel roller covered by polyurethane vulcanization? Or refilled parts: Steel base + Inconel...

I'm getting out of the question, but why are you doing a property form??? Don't want to fill in your data with the EPDM data card?

For the Fives pen... I already have one! :)

1 Like

And damn, I thought that the "Fives" pen was a rare commodity :)! Well a selfie with the pen then? Ahah

Basically, the purpose of my interface is the development of a design tool. Via the ownership form, the designer will be able to control the rooms according to data that he changes little by little according to the design.

So I have my property form that drives an assembly consisting of a skeleton and the parts attached to it. The skeleton controls the dimensions of the parts. But the parts are made of different materials depending on the desired heat exchanges.

So my property form is my interface between the designer and the design tool.

And I can't fill in this data from the EPDM board because there are multiple materials because there are multiple parts in the assembly. Also, this assembly serves as a design tool, so it would not be practical to drive parameters from EPDM.

The small downside is that Inventor allows you to manage this kind of data! Hence a little frustration ...

2 Likes

What you want to do, you can do it via the Smartproperties form, but I just re-checked with SW2014 (for SW2015 I don't know), via the property manager it's not feasible.

So we have to find the solution elsewhere...

 


capture.jpg
1 Like

Question:

Does your form only manage the dimensions of your skeleton in your assembly? Or does it manage the dimensions and all the properties of the assembly and the parts that compose it?

@flegendre,

The form manages the dimensions of the skeleton but also (at least I would like to achieve this), the materials of the parts