I use the parameter "D1@Boss.-Extru.1" in my data card to indicate the length of my part (I have several configurations in length).
This information is automatically updated.
When I go to part family, this parameter information is displayed but in the form of a value. Is it possible to enter a formula of type =L = & "D1@Boss.-Extru.1" & MM knowing that this formula does not work.
Thank you for your feedback because by going to the part family, I overwrite the formula present in the datacard and when creating a new part, the length parameter is no longer updated....
Logically, if you have a field that you can fill in your datacard, it should be linked to a custom property.
This custom property can therefore be controlled by excel in your room family.
You have to put a formula in the column of the property (the header of the column will be called $PROPRIETE@ followed by the name of the property).
At the formula level, it's excel syntax like =B5&"MM" where B5 is the cell containing your length value (so under the column that will be called D1@Boss.-Extru.1).
The easiest way with the parts families is to make one or two configurations by hand with ALL the differences you want to manage (on dimensions, properties, materials...) and make an automatic generation of the Excel family with ALL the parameters that SW proposes. Then you add your Excel formulas where necessary.
Thank you for your feedback, but it doesn't work completely.
if I'm on a new line, new cell, and I write: = B5 & "MM". It works. If I go back to this same cell and modify by adding for example "L = " in front of B5, it writes me the formula and no longer the result. And as a result, I have this problem for all the lines already created. Similarly, I tried by doing L = "D1@Esquisse1@nomdelapièce.sldprt"mm or D1@Boss.-Extru.1@nomdelapièce.sldprt with or without "" but it doesn't work any better....
Otherwise there is the concatener() function that allows you to do the same.
For this kind of thing it is better to work on the Excel syntax on everything related to the text (there are a lot of different functions depending on the result you want to obtain).
Including Solidworks syntax in the output of the Excel property works:
Excel returns a string that is then parsed by solidworks. If the string has the syntax that is fine, solidworks can transform the string "D1@Esquisse1@nomdelapièce.sldprt" back to its numeric value. On the other hand, it's very cumbersome to type in excel because the result of the excel formula must come out well a string with the "front and the " behind the name of the dimension. in practice you have to put """D1@Esquisse1@nomdelapièce.sldprt""" in Excel for it to work (3x the "consecutive" character). This gets "D1@Esquisse1@nomdelapièce.sldprt" in the value of the property's expression and Solidworks will evaluate it in the evaluated value column.
Personally, I don't recommend this kind of convoluted syntax if you are able to get the right result with a simpler formula.
The concatenate function works well in the data card. Thank you. Updating the simple parameter function in this way.
This is optimal for adding configurations through the part family.
However, when adding a configuration from the Configuration Tree, adding a configuration does not automatically update the parameter. This creates a risk of parameter error.
With us it's simple: if there is an Excel part family, it is FORBIDDEN to add configurations without going through the Excel part family. It's up to the designer's goodwill but if you have EPDM, you can always find the one who doesn't respect the rules and slap him on the wrist...
We have set up a color code in Excel to make people's lives easier (red = formula to copy without touching it, green = information to be entered by hand .....).