invalid syntax on bom list

invalid syntax on bom list

javiervega10
Advocate Advocate
1,116 Views
16 Replies
Message 1 of 17

invalid syntax on bom list

javiervega10
Advocate
Advocate

I have a row that I inserted with a formula. density x plate thickness, but in elements not plates, you cannot multiply the value "plate thickness" and place the value "invalid syntax", the question is how do I delet that text? I prefer that the cell be left blank or that I insert a number "0" or "1" so that it does not have that label

invalid syntax.png

1,117 Views
16 Replies
Replies (16)
Message 2 of 17

Flies-Eyes
Advisor
Advisor

From some recent testing of my own, I believe the syntax errors occur if you do not have each of the individual parameters listed in the row which the formula is using.

0 Likes
Message 3 of 17

Sebastian_Eiche
Mentor
Mentor

if it's not a plate and the token you nee is not there, the formula will give an error. Therefore you need to use a script like: is the object a plate, then use the Thinkness, for example (not tested just written here):

=IClass="Plate" ? ((double)IThick*(double)IDensity) : "-" 


Sebastian Eiche
Application Engineer @Mensch und Maschine acadGraph

EESignature

If this information was helpful, please use the Accept as Solution function, this make it easier for other users

0 Likes
Message 4 of 17

javiervega10
Advocate
Advocate

I thought the same thing, but I don't know how to write the formula, and if you can make a formula with a condition "if" like in Excel.
I think that it is possible, because the linear weight column works like that, it just already has a token for that

 

I still have no success

0 Likes
Message 5 of 17

bigcarl5000kg
Advisor
Advisor

Hi @javiervega10 ,

 

for profiles, it's not possible. To get the value kg/m2 you should use the formula "IGlobalWeight/IGlobalPaint"

 

EDIT:

bigcarl5000kg_0-1708420514643.png

 

The results are dependent on the accuracy of the units. This formula works for all objects in BOM.

+++ impossible immediately and miracles within 3 days +++
+++ the only constant is the change +++ stay tuned for more +++
+++ since 03/2023 is Advance Steel in maintenance mode, no further development +++
0 Likes
Message 6 of 17

Sebastian_Eiche
Mentor
Mentor

if there's a token  out of the box, the invalid error will not appear. but if you use this token for a formula, there could be an error.
Maybe you have a look in the forum for the threads beloning to script in BOMs. The formula which I wrote is working by adding this in the datafield property of the field in the BOM Editor.


Sebastian Eiche
Application Engineer @Mensch und Maschine acadGraph

EESignature

If this information was helpful, please use the Accept as Solution function, this make it easier for other users

0 Likes
Message 7 of 17

javiervega10
Advocate
Advocate

Did the formula you wrote work for you?
I made a copy of your formula and it didn't work for me.
In this link it explains how to make the condition formula, but I can't get it to work

https://help.autodesk.com/view/ADSTPR/2019/ENU/?guid=GUID-680192E0-374F-4A9C-9CAB-037DD1BD1CFA

0 Likes
Message 8 of 17

bigcarl5000kg
Advisor
Advisor

Hi @javiervega10,

 

in Advance Steel 2024, the expression IGlobalWeight/IGlobalPaint works ... see the picture in my last post 

+++ impossible immediately and miracles within 3 days +++
+++ the only constant is the change +++ stay tuned for more +++
+++ since 03/2023 is Advance Steel in maintenance mode, no further development +++
0 Likes
Message 9 of 17

javiervega10
Advocate
Advocate

I am using AS 2021, I already made that formula, but it gives the division of the weight by the paint area.
What I need is the weight per m2 of the plates.
If I put the formula density x thickness it gives the correct result, eg density = 7850 kg/m3
thickness=6.35mm
result=7850x.00635=49.84kg/m2. is the weight of the 1/4" plate per m2.
The problem is, in the list there are profiles that do not have the thickness value, and that is where the "invalid syntasys" appears
As Sebastian says, if the class = plate, then enter the multiplication value, if not, zero or null value.
but I can't get that formula to work.
I have checked other posts and I can't solve it.

0 Likes
Message 10 of 17

Sebastian_Eiche
Mentor
Mentor

The text I wrote is not the text you had to enter in the formula token...it need to be inserted directly in the data field. I will have some time on Friday for creating some pics 


Sebastian Eiche
Application Engineer @Mensch und Maschine acadGraph

EESignature

If this information was helpful, please use the Accept as Solution function, this make it easier for other users

0 Likes
Message 11 of 17

javiervega10
Advocate
Advocate

I have already tried to change the formula and I have see that the first condition is not work and it says "invalid syntax" and the second condition its ok
I put this formula so that in the same box I insert the weight /m,l or the weight /m2 if it is a plate

 

=(IWeightMetre/>0) ? (IWeightMetre) : (IThick*IDensity)

 

sintax invalyd.png

0 Likes
Message 12 of 17

Sebastian_Eiche
Mentor
Mentor

I think the first condition is wrong and the second one need to be converted

 

=IClass="Beam" ? (IWeightMetre) : ((double) IThick* (double) IDensity)

 

(Not tested I'm on with my phone)

 

 


Sebastian Eiche
Application Engineer @Mensch und Maschine acadGraph

EESignature

If this information was helpful, please use the Accept as Solution function, this make it easier for other users

0 Likes
Message 13 of 17

javiervega10
Advocate
Advocate

I already did it and nothing.
the error continues and with the correct value in the plate cell

=(IClass=="Beam") ? (IWeightMetre) : (IThick*IDensity)

I think it does not detect what is a condition and only returns the result of the multiplication of density x thickness

 

Is the condition written incorrectly?

0 Likes
Message 14 of 17

Sebastian_Eiche
Mentor
Mentor

You use a == which is not necessary in this case. And the multiplication is often only working if you add the number information (double) as I wrote. 

I use such scripts often and I'm sure this should work. 

 


Sebastian Eiche
Application Engineer @Mensch und Maschine acadGraph

EESignature

If this information was helpful, please use the Accept as Solution function, this make it easier for other users

0 Likes
Message 15 of 17

javiervega10
Advocate
Advocate

it does not work.
I have tried different ways to make the conditional formula and I have not succeeded.

0 Likes
Message 16 of 17

Sebastian_Eiche
Mentor
Mentor

Yes I could also not implement it by a few tests yesterday. Maybe it's faster to add this information in a user attribute instead of calculating it?

I will try it tomorrow again 


Sebastian Eiche
Application Engineer @Mensch und Maschine acadGraph

EESignature

If this information was helpful, please use the Accept as Solution function, this make it easier for other users

0 Likes
Message 17 of 17

javiervega10
Advocate
Advocate

Hi Sebastian,
Could you implement any formula?
I have tried and have not been successful.
If you place a user attribute as you mentioned, I think it would be tedious and there may be an error. Some formula must work, I'm sure, you just have to keep trying.

0 Likes