BOM: Add Text to Quantity

Hello

In a BOM, I need to add a text after the quantity. Ideally, it would look like this:

If the text remains on the same line, it will be the lesser evil.

Based on these pages:
- https://help.solidworks.com/2012/french/SolidWorks/sldworks/t_bomsCombining_Properties_in_Table_Equations.htm
- https://help.solidworks.com/2019/french/SolidWorks/sldworks/c_Equations_in_Tables_and_BOMs_bom.htm
I created a column of type Equation.
With  ='QTE'{}"PCS", it only keeps the PCS text;
With ='QTE', it shows me the quantity.

I tried to create a custom prop in the room, it doesn't work any better, either by calling the prop directly in the equation or by creating a column and then calling the column.

Another option would be to put the text in a column and hide the line between the cells but I haven't seen anything that allows this kind of manipulation.

 

Hello

If you have the MyCadTools, in Smart Properties you can create a property by concatenating the quantity value and your text.

Hello

Try "QTE"PCS in your property

or "QTE@Pièce1.SLDPRT"PCS

@remrem: At what level will the property thus created be  at what level? I'm not used to using Smart Props;

@Sylk: You mean in the equations? There is no possibility to make equations in the MEP (to my knowledge) and in the assembly, SW does not want a string when I create a global variable.

Hello@tous

An excel nomenclature  seems to me to be better suited for this kind of manipulation ;) It's even easy. 

1: variables for your quantities, e.g. "qte1" value =3 , "qte2" value =5 , etc

2: QTE1pp custom properties of text type, and value "qte1@Pièce1.SLDPRT" PCS , then QTE2pp value "qte2@Pièce1.SLDPRT" PCS , etc

Of course the part name is yours, but by scrolling down the values you click on qte1 or qte2 it adds it by itself. Just add PCS space behind.

3: In the column of your nomenclature you edit the quantity box then enter the equation ='QTE1pp' and valid, etc

Result:


qte_equation.png
qte_perso.png
qte_colonne.png

@Sylk: ok, I understand your variable story better. Problem: the quantity must remain dynamic...

And for the Excel nomenclature, I quite agree, but we don't master this aspect. It's up to the customer to decide.

What is the quantity of coins defined by? An automatic count of occurrences of parts in your assembly?

@Sylk: You can see it like this, it's an automatic SW nomenclature.

I guess then that there is no choice, you have to proceed by row with a cell (=D2" cte") with D2 corresponding to the corresponding quantity cell, this allows to keep the dynamic aspect provided that you do not insert new columns because the sw table and unlike excel does not keep the (identifiers!) of this columns;) 

1 Like

Well in fact the equation solver in the nomenclatures is totally buggy... column names (No ARTICLE, QTE, etc.) return a null value instead of the value. So the QTE appears "invisible" in front of the PCS. Impossible to calculate anything with it. If I ask QTY +0 it shows 0, since null+0=0. If we concatenate null and "pcs" it displays "pcs". Etc.

Big bug. Too bad because your problem was solved in 5 seconds.

And in response to @Lynk it doesn't work with the cell either, D2"pcs" is invalid and the cell is reset to its initial value (same as leaving the equation field empty).

1 Like

On my side it works

I suspect that the bug has been fixed in other versions. But obviously @Stefbeno's is not.

@Lynk If you empty your C cells, then you select your C column and enter the equation 'QTE' 'PCS' what does it say? 

No, I even have an earlier version than yours 18

For the question It gives "pcs" 

1 Like

I think I have found another solution better than the previous one:

'Qty' +0"cts"

Ref, it seems that it is possible to concatenate with prp-perso, column and others

(tested) 

1 Like

I had already tried 'QTE' +0' 'PCS' as said above, QTE is zero, and doesn't work either... and precisely all the alternatives of concatenations, calculations, conditions. Without success.

Well, I found it! Finally the only alternative I hadn't tested: 'QTE'+0{}" PCS"

1: Rename the QTE cell to QTE. (with the period)

2: Create a new column and name its first QTE cell

3: Click on the new column (on the letter, like E)

4: Enter the equation 'QTE.'+0{}" PCS" The entire column E will thus dynamically respond to the quantity of each part.

5: Right-click on the QTE column letter and then hide>column

So we only see the QTE column with the PCS, which then replaces the old original QTE column

Kind regards

@Sylk: so congratulations and hats off, a big thank you

1 Like

On the other hand! I just hit that it only works if all the assembly is complete. Adding a part does not count it correctly in the BOM, since the QTE column is renamed. Logic.

I think the easiest way is to do the same thing but leaving the original QTE, named as such, and to add the point on the new column. There it should work fully. I'm going to test that.

OK I confirm it works perfectly now. So I'm rewriting the tutorial properly.

1: Create a new column and name its first QTE cell. (with the period)

2: Click on the new column (on the letter, like E)

3: Enter the equation 'QTE'+0{}'PCS' (QTE without the dot). The entire column E will thus respond dynamically to the quantity of each part.

4: Right-click on the QTE column letter and then hide>column

5: Rename the QTE cell. in QTE (optional step, if preferred).

So we only see the QTE column with the PCS, which then replaces the original QTE column