Community
Fusion Electronics
Working an electronics project and need help with the schematic, the PCB, or making your components? Join the discussion as our community of electronic design specialists and industry experts provide you their insight and best practices.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

"Error in constant" on running ulp

16 REPLIES 16
Reply
Message 1 of 17
jimUR4RG
730 Views, 16 Replies

"Error in constant" on running ulp

When I try to run a ulp, it fails for almost every ulp with an error saying "<filename>(line number): error in constant".

I did some investigating, and it seems to have something to do with floating point numbers. This is just speculation but perhaps this is related to the issue where gerbers files are corrupted when Windows is configured to use a decimal comma?

When I open the .ulp file in a text editor, it seems the error occurs on the first line a floating point literal value is used.

For example, this line is OK (import-bmp.ulp: 360)
"real xScale = 1;"

But this line causes an error (import-bmp.ulp: 369)
real Offset = 0.5; // offset Wire width

This line also causes an error, seemingly because of the floating point literal (e-burkenverwaltung.ulp)
#require 6.0500

Tags (3)
Labels (1)
  • ULP
16 REPLIES 16
Message 2 of 17
engineeringNCMXB
in reply to: jimUR4RG

Have you tried initializing the variable with a float?

real xScale = 1.0;

 Not sure it will work, but it may impact the way the compiler/interpreter handles the variable. 

Carlos Acosta
Factory400 - YouTube|Instagram
Message 3 of 17
jimUR4RG
in reply to: engineeringNCMXB

The problem actually occurs when a float literal is used, like 1.0. If an integer literal is used, there is no problem, even if it is assigned to a float variable. Unfortunately, float literals are used in almost every ulp, so most ulps do not work.

Message 4 of 17
jimUR4RG
in reply to: jimUR4RG

Any input from an Autodesk employee would be greatly appreciated. I am unable to run most ulps on both of my computers because if this bug, which makes it impossible to do certain tasks.

Message 5 of 17
Anonymous
in reply to: jimUR4RG

I had the same issue. Sometimes ULPs work and sometimes I only get "Error in constant".

Restarting Fusion helped, then ULPs work for some minutes before you get the same error again.

Message 6 of 17
jorge_garcia
in reply to: jimUR4RG

Hello everyone,

 

This is very unusual, where are you located? Do you also experience the commas in the gerber file issue?

 

We haven't been able to reproduce something like this. I tried a few ULPs on my Windows machine and didn't have any issues. Are you all on Windows? Anyone on Mac?

 

Let me know if there's anything else I can do for you.

 

Best Regards,



Jorge Garcia
​Product Support Specialist for Fusion 360 and EAGLE

Kudos are much appreciated if the information I have shared is helpful to you and/or others.

Did this resolve your issue? Please accept it "As a Solution" so others may benefit from it.
Message 7 of 17
jimUR4RG
in reply to: jimUR4RG

Hi Jorge,

 

Thanks for replying. I am located in The Netherlands and I am using Dutch regional settings (which includes a decimal comman).

 

However, I've set the language of my OS (Windows 10) to English because it makes it easier to google if an issue arrives. I was also experiencing the gerber decimal comma issue and I have a suspicion that there could be a relation there.

 

I'm happy to run or check something on my machine to provide more information.

Message 8 of 17
jorge_garcia
in reply to: jimUR4RG

Hi @jimUR4RG ,

 

Did you setup the environment variable that fixes the comma issue? If you haven't done that here's the environment variable and it's value that you need to define.

 

FORCE_DECIMAL_GERBER_OUTPUT

value set to true

 

After you create the environment variable restart Fusion 360 for it to take effect.

 

If they are related this should solve both issues.

 

Let me know if there's anything else I can do for you.

 

Best Regards,



Jorge Garcia
​Product Support Specialist for Fusion 360 and EAGLE

Kudos are much appreciated if the information I have shared is helpful to you and/or others.

Did this resolve your issue? Please accept it "As a Solution" so others may benefit from it.
Message 9 of 17
jimUR4RG
in reply to: jimUR4RG

Hi Jorge,

 

I have set the environment variable and it fixed the gerber issue but not the ULP problem. However I don't fully agree with your statement "if these issues are related, then the environment variable must fix both issues". The environment variable is clearly specific for gerber files, and has nothing to do with ULPs. There could still be an underlying issue in the way Fusion handles decimal separators that is the root of both issues.

Message 10 of 17

I have the same problem, no ULP is working... I am in Switzerland.

Message 11 of 17
contact3K8F2
in reply to: jorge_garcia

Hi Jorge,

 

i also have problems with the ulp import: Windows, Germany.

At the beginning I imported a lot of bmp's successfully without problems. Then I set the environment variable because I had the comma issue in my gerber files. The variable solved the comma issue, but now I get the "error in constant" when I try to run import-bmp.ulp
After restarting Fusion, the upload works for one bmp file, then the same error occurs.


I would be very grateful for a stable and simple solution to place graphics on my PCBs.

 

This is the error i am getting:

error: C:/Users/conta/AppData/Local/Autodesk/webdeploy/production/9b292d8eef538636fb448307b89a33246e260a1a/Applications/Electron/LibEagle/examples/ulps/examples/import-bmp.ulp(369):

error in constant

Message 12 of 17

Hey,

 

I'm having the same issue with import-bmp.ulp. I'm located in Germany.

Message 13 of 17
Anonymous
in reply to: mathias.obetzhauser

I am getting the same "Error in constant " message in all ULPs I am trying on Fusion360, e. g. "import-gerber".  However, I have both Fusion360 and Eagle installed in the same machine as a fallback, and "import-gerber" runs smoothly on Eagle. I am located in Brazil, and Windows is configured for the Brazilian regional settings, including comma as decimal separator.

Message 14 of 17
ixyutak
in reply to: jorge_garcia

Hi. My location is Uzbekistan. My operation system is Windows 10. I have also such kind of problem. But not all documents. ULP scripts works on some documents. It may be related to the document ?

Message 15 of 17
Anonymous
in reply to: jorge_garcia

I'm in Turkey and I get similar error for another ULP.

And it occurs occasionally, not always. Sometimes it works sometime not.

 

Message 16 of 17
jorge_garcia
in reply to: jimUR4RG

Hi @Anonymous and everyone else,

 

I'm trying to get more eyes on this issue to see if it can be sorted. @HelenChen-ElectronicsQA this one needs a ticket.

 

Best Regards,



Jorge Garcia
​Product Support Specialist for Fusion 360 and EAGLE

Kudos are much appreciated if the information I have shared is helpful to you and/or others.

Did this resolve your issue? Please accept it "As a Solution" so others may benefit from it.
Message 17 of 17

OK, @jorge_garcia , I just logged a ticket about this. Thanks.

Regards,

Helen



Helen Chen
Principle QA for Fusion 360 Electronics

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Technology Administrators


Autodesk Design & Make Report