- Home
- Download
- PCB-Investigator
- Plug-Ins
- Overview
- 3D Export Catia/Solidworks
- AOI
- Bare Board Analysis DFM
- Color Group
- Component Analysis DFM
- Component Connect
- Database Compare
- Design Report
- DXF Export
- DXF Import
- Edit CMP
- Embedded
- GenCAD Import/Export
- Graphic Board Compare
- Hazard Analysis
- Net Length
- Net List
- Panel Builder
- PDF Sync
- Short Cut Top Bottom View
- Sketch Up Export
- Testpoint Report
- Tombstone DFM Analysis
- Order
- Blog
- Support
- Company
Interface ODB++ Files
Tue, 2012-06-19 13:20
Hyountag Oh
Your name:
Hyountag Oh
Your e-mail:
hyountag.oh@lge.com
I tested this code.
and i checked the PCBI load ODB++ files
but i don't know how i can access the odblayer, odbobject, ILinesSpecific, IArcSpecific.....
i want to extract the raw feature ( like circle, line, surface,,,,,)
PCBI.Automation.IPCBIWindow window;
public Form1()
{
InitializeComponent();
}
private void button1_Click(object sender, EventArgs e)
{
window = IAutomation.CreateNewPCBIWindow(true);
window.LoadODBJob("c:\\mgf12024");
window.Show();
}
Wed, 2012-06-20 08:28
Hi Hyountag Oh,
Here is a simple example to get all the lines from the ODB ++ job, you can simply replace the ILineSpecifics with other Specifics for arcs or pads.
private List GetAllLines( PCBI.Automation.IPCBIWindow window)
{
List returnListWithAllLines = new List();
if (!window.JobIsLoaded)
return returnListWithAllLines;
IStep currentStep = window.GetCurrentStep(); //window.GetStep("name"); //(alternativ it you want a specific step)
//ILayer selectedLayer = currentStep.GetLayer("name"); //íf you know the name of the layer you can use this
IMatrix jobMatix = window.GetMatrix();
foreach (string layername in currentStep.GetAllLayerNames())
{
if (jobMatix.GetMatrixLayerType(layername) != MatrixLayerType.Signal) //example to use the matrix informations
continue;
if (jobMatix.GetMatrixLayerContext(layername) != MatrixLayerContext.Board) //example to use the matrix informations
continue;
ILayer currentLayer = currentStep.GetLayer(layername); //load the layer
if (currentLayer is IODBLayer)
{
//only for IODBLayers
List LayerItems = currentLayer.GetAllLayerObjects();
foreach (IODBObject odbObject in LayerItems) //this is only possible for IODBLayers, e.g. for ICMPLayers you get an exception!
{
IObjectSpecifics specifics = odbObject.GetSpecifics();
//if(odbObject.Type == IObjectType.Line) //or use:
if (specifics is ILineSpecifics) //check is this a line?
{
returnListWithAllLines.Add((ILineSpecifics)specifics);
}
}
}
}
return returnListWithAllLines;
}
For the raw feature information you need the IODBObject.GetSpecifics(), the best is to hold the IODBObject and the specifics in memory, if you want to change some parts of an IODBObject you have to use IODBObject.SetSpecifics(specifics);
Hope this helps


