juulsA / exportJson

Skill script for Allegro PCB designer, which generates a JSON representation of the board.
MIT License
17 stars 8 forks source link

exportJson error:can't handle (nil - 0.0) #3

Closed yzx0708 closed 1 year ago

yzx0708 commented 1 year ago

Hi: I want to convert an allegro .brd file to json after converting to ibom, but I get the following error: Command > exportJson W- WARNING No variant.lst found, exporting entire design ... CDS version: 16.600000 E- Error difference: can't handle (nil - 0.0) Command > exportJson( ?excludeDNP t ) E- Command not found: exportJson( ?excludeDNP t ) I am not skilled in allegro, please advise how to solve this error, thank you!

juulsA commented 1 year ago

Hi, this happens when allegro tries to access a property or something like this, that does not exist ... it would be the best, if you could share your design, so I can look into it. But please be patient, I can't look into it right away.

Moreover you're passing the ?excludeDNP argument, but there's no variant.lst present. Please create the variant.lst or just execute exportJson(), maybe this already solves your problem.

juulsA commented 1 year ago

You are using the command line, which is fine, if you are only using exportJson, but if you want to pass arguments to that function you have to do that in the skill environment. That means, you have to type set telskill to your command line first and a new window will open. In this window you can use the function with arguments.

Anyway, only using exportJson won't solve your problem, so I will need your design ...

yzx0708 commented 1 year ago

How did I give you my design files,email?

juulsA commented 1 year ago

Sorry for my late response ... you can attach your board file directly to this issue by dragging and dropping or please wait until I added some debug messages, so we can figure out, what the problem is. I think I'll get this done by tomorrow.

yzx0708 commented 1 year ago

err I passed through the exportJson.Il file added warn information, found that the error appeared in this position in the screenshot

juulsA commented 1 year ago

Ok, then I assume, that outline->segments is nil. Did you draw your board outline on the Board Geometry/Outline layer?

yzx0708 commented 1 year ago

outl I drew the outline,But it's 4 VERTICAL LINE SEGMENT top,bottom,left,right.

juulsA commented 1 year ago

I'm not sure, what you mean with

" ... which is a .bsm file."

But can you only apply "Shapes" to the find filter and try to select the board outline? If that doesn't work, that might even be our problem. Maybe there is no shape but just lines ...

yzx0708 commented 1 year ago

I'm not sure, what you mean with

" ... which is a .bsm file."

But can you only apply "Shapes" to the find filter and try to select the board outline? If that doesn't work, that might even be our problem. Maybe there is no shape but just lines ...

Sorry, I'm not familiar with allegro, the description is wrong, this PCB outline is drawn with 4 VERTICAL LINE SEGMENT

juulsA commented 1 year ago

The board outline has to be a shape, otherwise the code is not working. So please draw a polygon instead of the individual lines. Or, just for testing, draw a rectangle and execute the code, then we know, that this is the reason, why the code is not working.

yzx0708 commented 1 year ago

The board outline has to be a shape, otherwise the code is not working. So please draw a polygon instead of the individual lines. Or, just for testing, draw a rectangle and execute the code, then we know, that this is the reason, why the code is not working.

I drew a rectangle on the outline and the conversion was successful, thank you very much.