Numerical Matrix Format
User Reference
Using the Selection Filter, Copy and Transform

These following examples will demonstrate using Object selection, filters, design modifications and finally output results to a Workspace files (*.wrk)

Note
AutoLoad EDA/CAD files: Whenever Matrix Import arrays are not defined (like GERBER array, ODB++, etc.), by default, all files inside the active folder will be AutoLoaded. For more information on this ability AutoLoad Array

Copy and Transform

Select all objects and make a copy that is transformed by (3,-3) inches. Save results to a Workspace file (*.wrk)
Resulting Image

##########################################
## Sample Matrix code
##########################################
SELECTION {
Name=Set1
JOB=@active
SELECT_ALL
}
TRANSFORM {
JOB=@active
UNITS=INCH
COPY=3,-3,Set1
}
SERIALIZE{
FILE=myWorkspaces/example1-1.wrk
}

XML:

<!--
##########################################
## Sample Matrix code
##########################################
-->
<NumericalMatrix>
<SELECTION>
<Name>Set1</Name>
<JOB>@active</JOB>
<SELECT_ALL/>
</SELECTION>
<TRANSFORM>
<JOB>@active</JOB>
<UNITS>INCH</UNITS>
<COPY>3,-3,Set1</COPY>
</TRANSFORM>
<SERIALIZE>
<FILE>myWorkspaces/example1-1.wrk</FILE>
</SERIALIZE>
</NumericalMatrix>


JSON example:

{
"NumericalMatrix": {
"SELECTION": {
"Name": "Set1",
"JOB": "@active",
"SELECT_ALL": {}
},
"TRANSFORM": {
"JOB": "@active",
"UNITS": "INCH",
"COPY": "3,-3,Set1"
},
"SERIALIZE": {
"FILE": "myWorkspaces/example1-1.wrk"
}
}
}

Using the Selection Filter

Select Mask layers and make a copy that is transformed by (3,-3) inches. Save results to a Workspace file (*.wrk)
Resulting Image

##########################################
## Sample Matrix code
##########################################
FILTER {
NAME=MyMaskLayers
LAYERS=[Mask]
}
SELECTION {
Name=Set1
Filter=MyMaskLayers
JOB=@active
SELECT_ALL
}
TRANSFORM {
JOB=@active
UNITS=INCH
COPY=3,-3,Set1
}
SERIALIZE{
FILE=myWorkspaces/example1-2.wrk
}

XML example:

<!--
##########################################
## Sample Matrix code
##########################################
-->
<NumericalMatrix>
<FILTER>
<NAME>MyMaskLayers</Name>
<LAYERS>[Mask]</LAYERS>
</FILTER>
<SELECTION>
<Name>Set1</Name>
<Filter>MyMaskLayers</Filter>
<JOB>@active</JOB>
<SELECT_ALL/>
</SELECTION>
<TRANSFORM>
<JOB>@active</JOB>
<UNITS>INCH</UNITS>
<COPY>3,-3,Set1</COPY>
</TRANSFORM>
<SERIALIZE>
<FILE>myWorkspaces/example1-2.wrk</FILE>
</SERIALIZE>
</NumericalMatrix>


JSON example:

{
"NumericalMatrix": {
"FILTER": {
"NAME": "MyMaskLayers",
"LAYERS": "[Mask]"
},
"SELECTION": {
"Name": "Set1",
"Filter": "MyMaskLayers",
"JOB": "@active",
"SELECT_ALL": ""
},
"TRANSFORM": {
"JOB": "@active",
"UNITS": "INCH",
"COPY": "3,-3,Set1"
},
"SERIALIZE": {
"FILE": "myWorkspaces/example1-2.wrk"
}
}
}



Move Rectangular Objects on Top layer - less than 0.3mm width

Select filtered objects and move to the right by 180 mm. Save results to a Workspace file (*.wrk)
Resulting Image

##########################################
## Sample Matrix code
##########################################
# 1. The filter array is unnamed - the default filter will be used.
# 2. Units may be directly type cast in the filter array
FILTER {
LAYERS=[Top]
# Select Objects using an Aperture with a Rectangle width less than 0.3mm
APERTURES=rectangle,width<0.3mm
}
# Missing "Filter=" becuase the default filter will be used.
SELECTION {
Name=Set1
JOB=@active
SELECT_ALL
}
TRANSFORM {
JOB=@active
UNITS=MM
MOVE=180,0,Set1
}
SERIALIZE{
FILE=myWorkspaces/example1-3.wrk
}

XML example:

<!--
##########################################
## Sample Matrix code
##########################################
# 1. The filter array is unnamed - the default filter will be used.
# 2. Units may be directly type cast in the filter array
-->
<NumericalMatrix>
<FILTER>
<LAYERS>[Top]</LAYERS>
<!-- Select Objects using an Aperture with a Rectangle width less than 0.3mm -->
<APERTURES>rectangle,width&lt;0.3mm</APERTURES>
</FILTER>
<!-- Missing "Filter=" becuase the default filter will be used. -->
<SELECTION>
<Name>Set1</Name>
<JOB>@active</JOB>
<SELECT_ALL/>
</SELECTION>
<TRANSFORM>
<JOB>@active</JOB>
<UNITS>MM</UNITS>
<MOVE>180,0,Set1</MOVE>
</TRANSFORM>
<SERIALIZE>
<FILE>myWorkspaces/example1-3.wrk</FILE>
</SERIALIZE>
</NumericalMatrix>

JSON example:

{
"NumericalMatrix": {
"FILTER": {
"LAYERS": "[Top]",
"APERTURES": "rectangle,width&lt;0.3mm"
},
"SELECTION": {
"Name": "Set1",
"JOB": "@active",
"SELECT_ALL": ""
},
"TRANSFORM": {
"JOB": "@active",
"UNITS": "MM",
"MOVE": "180,0,Set1"
},
"SERIALIZE": {
"FILE": "myWorkspaces/example1-3.wrk"
}
}
}