You can add components to a library by providing all parameters via a text file. Using a text file makes it easy to enter data for similar groups of components.
To add components via a batch file
Click the folder where you want to add the new items.
-
Choose the command Edit » Create from file or click on the tool in the toolbar. The dialog box in which to select the batch file opens.
In the dialog box, select the file and click Open.
File Format
The text file containing all information about components and folders can be created using any ASCII editor, and consists of a header and a list of directives.
The Header
The first line of the file must begin with 'DRAWLOGIX-DEVICE-DEFINITION' followed by the version number consisting of 3 numeric characters. The current version number is 100.
DRAWLOGIX-DEVICES-DEFINITION-100 ... directives ... |
The directives
Each directive occupies a line and is identified by the first character, other than the space or tabulation character, present in the line. A line starting with the asterisk character (*) is interpreted as a comment and ignored. The available directives are listed in the following table.
Directive | Description |
---|---|
* |
Comment. |
@ |
Symbolic constant.
The standard series of values can be specified using the following syntax:
scalefactor is the scaling factor to be used for the numerical value.
This parameter can be omitted.
If not specified is 1.
You can directly specify the scaling factor or one of the following values:
Example:
@CAP E24(10,91,0,p);E12(100,82000,0,p) |
? |
Conditional symbolic constant.
|
# |
New component. |
& |
Default value. |
$ |
Parameter value. |
! |
Skip the loop pass. |
{ } |
New folder. |
[ ] |
Loop. |
< > |
Conditional block.
To include also the else block use the following form.
The block between the second pair of angle brackets is only executed if the expression is false. |
% |
Set an option. |
Parameters
Each parameter in the Component Properties tab is identified by a numeric code. It is possible to specify a default value for the common parameters so as to set for each component only the parameters that characterize it. The following table lists the parameter codes.
Code | Parameter |
---|---|
1 |
Name in the schematics.
|
2 |
Reference prefix. |
3 |
Icon. |
4 |
Family. |
5 |
SubFamily. |
6 |
Manufacturer. |
7 |
Datasheet link. |
8 |
Description. |
9 |
Symbol. |
10 |
Footprint. |
11 |
CARD |
12 |
MODEL |
13 |
PINS |
20 |
Attributes. value is the attribute value. |
30 |
Arbitrary series repetition. |
31 |
Standard series repetitions. Use this code to compile the list of repetitions in the component tab.
The list of repetitions is compiled with the values of the standard series specified by the table parameter.
Variable {$1} is assigned the value of the component and variable {$2} is assigned the 3-digit or 4-digit numeric code of the value.
scalefactor is the scaling factor to be used for the numerical value.
This parameter can be omitted. If not specified, it is 1.
You can directly specify the scaling factor or one of the following values:
|
Options
The options allow you to change some of the settings.
Code | Description |
---|---|
1 |
Sets the separator character of arbitrary repetition values.
The default value is the pipe character (|).
|
2 |
Sets the separator character for arbitrary repetition lines.
The default value is the semicolon character (;).
char is the separator character. |
Example
Copy code | |
---|---|
DRAWLOGIX-DEVICES-DEFINITION-100
&2:C
&3:2
&4:Capacitor
&5:Ceramic Chip Capacitor
&6:Kemet
&7:http://www.kemet.com/Lists/ProductCatalog/Attachments/53/KEM_C1002_X7R_SMD.pdf
{ X7R Dielectric, 6.3-250 VDC (Commercial Grade)
[ 60 CAP
@CV E24(10,91,0,p);E12(100,82000,0,p)
@CC E24(10,91,3);E12(100,82000,3)
{ @CVF
[ 9 VOLT
@VV 6.3;10;16;25;35;50;100;200;250
@VC 9;8;4;3;6;5;1;2;A
{ @VV VDC
[ 3 TOL
@TL 5%;10%;20%
@TC J;K;M
{ @TL
[ 4 PAK
@PK 0402;0603;0805;1206
@PC BB;CF;DN;EB
@FT @PC
* skip invalid devices
! (PAK==0) && ((VOLT==4) || (VOLT>5))
! (PAK==1) && (VOLT==4)
! (PAK==0) && (VOLT==5) && (CV>22000p)
! (PAK==0) && (VOLT==3) && (CV>47000p)
! (PAK==1) && (VOLT==6) && (CV>47000p)
! (PAK==1) && (VOLT==7) && (CV>10000p)
! (PAK==1) && (VOLT==8) && (CV>10000p)
! (PAK==1) && (VOLT==8) && (CV<1000p)
! (PAK==2) && (VOLT==8) && (CV<180p)
! (PAK==2) && (VOLT==8) && (CV>68000p)
! (PAK==2) && (VOLT==7) && (CV>68000p)
! (PAK==3) && (VOLT==8) && (CV<1000p)
* replace default footprint
?FT ((CV==22p) && (PAK==2) && (VOLT<=5)) DM
?FT ((CV>=27000p) && (CV<=39000p) && (PAK==2) && (VOLT==6)) DP
?FT ((CV>=27000p) && (CV<=39000p) && (PAK==2) && (VOLT==7)) DE
?FT ((CV>=27000p) && (PAK==2) && (VOLT==7)) DG
?FT ((CV==39000p) && (PAK==3) && (VOLT==6)) EC
?FT ((CV==47000p) && (PAK==1) && (VOLT==5)) CJ
?FT ((CV==47000p) && (PAK==2) && (VOLT<6)) DO
?FT ((CV>47000p) && (PAK==2) && (VOLT<6)) DP
?FT ((CV>=47000p) && (PAK==2) && (VOLT==6)) DE
?FT ((CV>=47000p) && (PAK==2) && (VOLT==7)) DG
?FT ((CV>=27000p) && (PAK==2) && (VOLT==8)) DG
?FT ((CV==39000p) && (PAK==3) && (VOLT==6)) EC
?FT ((CV==47000p) && (PAK==3) && (VOLT==6)) EC
?FT ((CV>=47000p) && (PAK==3) && (VOLT>=7)) ED
* build record
#@CVF, @VV VDC, @TL, Case Size @PK
$1:@CVF
$9:CAP
$10:KEMET_CAP_@PK_@FT
$8:Surface Mount Multilayer Ceramic Chip Capacitor
$20:MFRPARTNUMBER/DEVICE=C@PKC@CC@TC@VCRACTU
$20:TOLERANCE/SPICE=@TL
]
}
]
}
]
}
]
}
|