Electronics > KiCad

KiCad "undefined DRAW command #" error.

(1/2) > >>

firewalker:
Does anyone faces the "undefined DRAW command #" error when importing converted libraries form EAGLE? It happens to the new versions o KiCad.

Alexander.

amspire:
I haven't tried it yet, but if you know the file with the problem, look at the line number in question.

The first character in the line sets the type of DRAW command. The latest KiCad eeschema allows for types "A" (Arc), "C" (Circle), "T" (Text), "S" (Square), "X" (Pin Description), "P" (Polyline), and "B" (Bezier Curve).

If it is none of these you get the error message.

Some builds lost the Bezier curve ("B") option, but I know the latest build I posted in the forum does have it.

Richard.

firewalker:
For example the relay library (http://library.oshec.org/compressed/relay.tar.gz).


--- Quote ---#
# Dev Name: G2R
# Package Name: G2R
# Dev Tech: ''
# Dev Prefix: K
# Gate count = 2
#
DEF G2R K 0 40 Y Y 2 L N
# Gate Name: 1
# Symbol Name: K
F0 "K" 0 0 50 H V L B
F1 "G2R" 50 115 50 H V L B
F2 "relay-G2R" 0 150 50 H I C C
DRAW
P 2 1 0 0 -150 -75 -75 -75
P 2 1 0 0 150 -75 150 75
P 2 1 0 0 150 75 75 75
P 2 1 0 0 -150 75 -150 -75
P 2 1 0 0 0 -100 0 -75
P 2 1 0 0 0 -75 150 -75
P 2 1 0 0 0 100 0 75
P 2 1 0 0 0 75 -150 75
P 2 1 0 0 -75 -75 75 75
P 2 1 0 0 -75 -75 0 -75
P 2 1 0 0 75 75 0 75
T 0 225 235 70 0 1 0 >PART
X 1 1 0 200 100 D 40 40 1 1 P
X 2 2 0 -200 100 U 40 40 1 1 P
# Gate Name: 2
# Symbol Name: U
P 2 2 0 0 125 200 75 200
P 2 2 0 0 -125 200 -75 200
P 2 2 0 0 0 50 100 225
P 2 2 0 0 0 50 0 0
C 0 50 5 2 1 0 F
T 0 275 35 70 0 2 0 >PART
X O O 200 200 100 L 40 40 2 1 P
X P P 0 -100 100 U 40 40 2 1 P
X S S -200 200 100 R 40 40 2 1 P
ENDDRAW
ENDDEF
--- End quote ---

The as I can understand the problem occurs with multi part components like G2R.

(image from EAGLE)


There are hundreds of errors for the relay lib.

Deleting the two lines makes the component to appear in the lib browser but only the first part of it.


amspire:
The eeschema library load does not allow for lines beginning with "#" between the DRAW and ENDRAW statements in the lib file.

It may need a change to the Eagle export script. I don't know enough about it to say if it is an easy fix or a difficult one.

I guess the thing to do would be to look at the lib format for another multipart component such as a LM324 quad opamp and see how multipart components should be handled.

Richard

amspire:
I just discovered that this is how eeschema handles multipart components.

It always installs the first component part (Part A), which in the case of this relay is the coil.  So just add it twice.

Right click on the second one and go to Edit->Unit and change it from Unit 1A to Unit 2B

When you give the component a designation, it will add an "A" to the end of the part A item (the coil) and a "B" to the end of the part B item (the contacts).

So if you called it Rel01, you would end up with Rel01A and Rel01B.

It seems you can safely delete the stuff starting with "#" inside the DRAW section.

Richard

Navigation

[0] Message Index

[#] Next page

There was an error while thanking
Thanking...
Go to full version
Powered by SMFPacks Advanced Attachments Uploader Mod