1. Introduction
The library (ExpAPI.lib file) is to be added into a project
where users build their plug-in in the form of a Dynamic Linked Library
(DLL). The built DLL is to be integrated into Expert main
application.
Figure 1. Using Expert API
2. Plug-in Creation
The easiest way to start creating plug-ins is to use
the example included into the distribution of CELEBRITY.
It requires Microsoft Visual C++ v.6.0. The example is complete MS VC++
project for a simple plug-in that creates a new menu item in Expert.
You must do the following:
1. Unzip Plugset.zip into any place (PlugSet directory
structure will be created there).
2. Run VC++.
3. File >>Open Workspace... select PlugSet\Plug\Plug.dsw
4. Project >> Settings... (Alt-F7)
5. Builg >> Set Active configuration Choose Plug-Win32
Debug (or Release)
6. Build >> Build Plug.dll (F7) 7. Execute (Ctrl-F5)
You should see Expert running, with a new "Plug" menu item.
Figure 2. Plug-in Creation
3. API Description
All of these functions have ExpApi prefix.
3.1. Data Types
3.2. Functions
| void |
ExpApiSetUnits(UUNITS
nUnit, double dValue = 0.); |
| UUNITS |
ExpApiGetUnits(); |
| Double |
ExpApiGetUnitUMValue(UUNITS
nUnit); |
| |
|
| void |
ExpApiXiInit(); |
| BOOL |
ExpApiXiRun(LPCTSTR
sz); |
| |
|
| BOOL |
ExpApiFileSelector(LPCTSTR
szFileName, LPCTSTR lpszFilter = NULL, LPCTSTR lpszDefExt = NULL,
BOOL bLoad = TRUE); |
| |
|
| void |
ExpApiUpdate();
|
| void |
ExpApiRedrawView(CEARect*
rect = NULL); |
| void |
ExpApiRedrawObject(HOBJECT
hObject); |
| |
|
| BOOL |
ExpApiProjectNew(LPCTSTR
szProjName, LPCTSTR szTechName = NULL); |
| BOOL |
ExpApiProjectLoad(LPCTSTR
szProjName, LPCTSTR szOutputProjectName = NULL, LPCTSTR szTechName
= NULL, BOOL bReadOnly = FALSE); |
| BOOL |
ExpApiCloseProject();
|
| BOOL |
ExpApiSaveProject();
|
| BOOL |
ExpApiSaveAsProject(LPCTSTR
szProjName); |
| BOOL |
ExpApiCompressProject();
|
| |
|
| CEAPoint |
ExpApiGetMousePoint(RCEAPoint
ptPtev); |
| CEARect |
ExpApiGetMouseRect();
|
| BOOL |
ExpApiIsRMousePress();
|
| |
|
| void |
ExpApiSetRefPoint(RCEAPoint
pt); |
| CEAPoint |
ExpApiGetRefPoint();
|
| BOOL |
ExpApiActivateRefPoint(BOOL
bRefPointActivate = TRUE); |
| |
|
| BOOL |
ExpApiSetActiveLayer(LPCTSTR
szLayerName); |
| LPCTSTR |
ExpApiGetActiveLayer();
|
| |
|
| BOOL |
ExpApiSetActiveCell(LPCTSTR
szCellName); |
| LPCTSTR |
ExpApiGetActiveCell();
|
| |
|
| void |
ExpApiGetObjectProperty(HOBJECT
hObject, OBJECT_PROPERTY& Property); |
| int |
ExpApiSearch(CEASearchContext&
SearchContext, LPCTSTR szCellName = NULL); |
| |
|
| HOBJECT |
ExpApiGetFoundFirstObject(LPCTSTR
szCellName = NULL); |
| HOBJECT |
ExpApiGetFoundNextObject
(LPCTSTR szCellName = NULL); |
| HOBJECT |
ExpApiGetFoundPrevObject
(LPCTSTR szCellName = NULL); |
| HOBJECT |
ExpApiGetFoundLastObject
(LPCTSTR szCellName = NULL); |
| |
|
| BOOL |
ExpApiSelectObject(HOBJECT
hObject); |
| BOOL |
ExpApiDeleteSelected();
|
| |
|
| HOBJECT |
ExpApiAddObject(OBJECT_PROPERTY&
Property); |
| HOBJECT |
ExpApiModifyObject(HOBJECT
hObject, OBJECT_PROPERTY& Property); |
| BOOL |
ExpApiDeleteObject(HOBJECT
hObject); |
| |
|
| HOBJECT |
ExpApiGetFirstObject(LPCTSTR
szCellName = NULL, LPCTSTR szLayerName = NULL); |
| HOBJECT |
ExpApiGetNextObject(LPCTSTR
szCellName = NULL, LPCTSTR szLayerName = NULL); |
| |
|
| HOBJECT |
ExpApiGetFirstInstObject(LPCTSTR
szCellName = NULL, LPCTSTR szInstName = NULL); |
| HOBJECT |
ExpApiGetNextInstObject(LPCTSTR
szCellName = NULL, LPCTSTR szInstName = NULL); |
| |
|
| BOOL |
ExpApiCreateNewCell(LPCTSTR
szCellName); |
| BOOL |
ExpApiCreateAsNewCell(LPCTSTR
szCellName); |
| BOOL |
ExpApiDeleteCell(LPCTSTR
szCellName = NULL, BOOL bHier = FALSE); |
| BOOL |
ExpApiRenameCell(LPCTSTR
szTargetCell, LPCTSTR szCellName = NULL); |
| |
|
| BOOL |
ExpApiSaveCell(LPCTSTR
szCellName = NULL, BOOL bCheckInOut = FALSE); |
| BOOL |
ExpApiSaveAsCell(LPCTSTR
szTargetCell, LPCTSTR szCellName = NULL, BOOL bCheckInOut = FALSE);
|
| BOOL |
ExpApiDiscardCell(LPCTSTR
szCellName = NULL); |
| BOOL |
ExpApiReadOnlyCell(LPCTSTR
szCellName = NULL); |
| |
|
| HOBJECT |
ExpApiCreateBox(double
dSx, double dSy, double dEx, double dEy, LPCTSTR szLayerName = NULL);
|
| HOBJECT |
ExpApiCreateBox(RCEAPoint
ptPos, RCEAPoint ptSize, LPCTSTR szLayerName = NULL); |
| HOBJECT |
ExpApiCreateBox(RCEARect
rtRect, LPCTSTR szLayerName = NULL); |
| |
|
| HOBJECT |
ExpApiCreateCircle(double
dSx, double dSy, double dRadius, LPCTSTR szLayerName = NULL); |
| HOBJECT |
ExpApiCreateCircle(RCEAPoint
ptCenter, double dRadius, LPCTSTR szLayerName = NULL); |
| |
|
| HOBJECT |
ExpApiCreateEllipse(double
dSx, double dSy, double dEx, double dEy, LPCTSTR szLayerName = NULL);
|
| HOBJECT |
ExpApiCreateEllipse(RCEAPoint
ptCenter, RCEAPoint ptRadius, LPCTSTR szLayerName = NULL); |
| HOBJECT |
ExpApiCreateEllipse(RCEARect
rtRect, LPCTSTR szLayerName = NULL); |
| |
|
| HOBJECT |
ExpApiCreateDonut(RCEAPoint
ptCenter, double dRad1, double dRad2, LPCTSTR szLayerName = NULL);
|
| HOBJECT |
ExpApiCreateRegion(CEAPointsArray&
Points, LPCTSTR szLayerName = NULL); |
| HOBJECT |
ExpApiCreateLine(CEAPointsArray&
Points, double dWidth, LPCTSTR szLayerName = NULL); |
| |
|
| HOBJECT |
ExpApiCreateText(LPCTSTR
szText, RCEAPoint ptPos, double dWidth, double dHeight, double dEscapement
= 0., BOOL bSlant = FALSE, BOOL bMirroring = FALSE, LPCTSTR szLayerName
= NULL); |
| |
|
| HOBJECT |
ExpApiCreateText(LPCTSTR
szText, RCEARect rtRect, double dEscapement = 0., BOOL bSlant =
FALSE, BOOL bMirroring = FALSE, LPCTSTR szLayerName = NULL); |
| |
|
| BOOL |
ExpApiSetOrigin(RCEAPoint
pt, LPCTSTR szCellName = NULL); |
| BOOL |
ExpApiSetOrigin(double
dx, double dy, LPCTSTR szCellName = NULL); |
| BOOL |
ExpApiSetAngleMode(DAM
daMode); |
| DAM |
ExpApiGetAngleMode();
|
| |
|
| BOOL |
ExpApiCut(); |
| BOOL |
ExpApiCopy();
|
| BOOL |
ExpApiPaste(RCEAPoint
pt); |
| BOOL |
ExpApiPaste(double
dx, double dy); |
| BOOL |
ExpApiMove(RCEAPoint
pt); |
| BOOL |
ExpApiMove(double
dx, double dy); |
| BOOL |
ExpApiDuplicate(RCEAPoint
pt); |
| BOOL |
ExpApiDuplicate(double
dx, double dy); |
| BOOL |
ExpApiRotate(double
dx, double dy, double dAngle, BOOL bDuplicate = FALSE); |
| BOOL |
ExpApiRotate(RCEAPoint
pt, double dAngle, BOOL bDuplicate = FALSE); |
| |
|
| BOOL |
ExpApiFlipVertical(double
dCenter); |
| BOOL |
ExpApiFlipHorizontal(double
dCenter); |
| BOOL |
ExpApiMirrorVertical(double
dCenter); |
| BOOL |
ExpApiMirrorHorizontal(double
dCenter); |
| |
|
| BOOL |
ExpApiSelectNewest();
|
| BOOL |
ExpApiSelectLayer(LPCTSTR
szLayerName = NULL); |
| BOOL |
ExpApiSelectAll();
|
| BOOL |
ExpApiUnselectAll();
|
| BOOL |
ExpApiInvertSelection();
|
| |
|
| BOOL |
ExpApiSelReselect();
|
| BOOL |
ExpApiSelSelect();
|
| BOOL |
ExpApiSelDeselect();
|
| |
|
| BOOL |
ExpApiSelModeInside();
|
| BOOL |
ExpApiSelModeCross();
|
| |
|
| BOOL |
ExpApiSelModeBoundary();
|
| BOOL |
ExpApiSelModeSolid();
|
| |
|
| BOOL |
ExpApiSelectByType(SEARCH_OBJECT_
TYPE sType, LPCTSTR szCellName = NULL); |
| |
|
| BOOL |
ExpApiIgnoreInstances();
|
| BOOL |
ExpApiIgnorePrimitives();
|
| |
|
| BOOL |
ExpApiMoveToActiveLayer();
|
| BOOL |
ExpApiCopyToActiveLayer();
|
| BOOL |
ExpApiSaveSelectedAsCell(LPCTSTR
szCellName); |
| BOOL |
ExpApiSelectByBox(double
dSx, double dSy, double dEx, double dEy, SELECT_BOOL_MODE selMode
= SBM_SELECT_RESELECT); |
| BOOL |
ExpApiSelectByBox(RCEAPoint
ptStart, RCEAPoint ptEnd, SELECT_BOOL_MODE selMode = SBM_SELECT_RESELECT);
|
| BOOL |
ExpApiSelectByBox(RCEARect
rtRect, SELECT_BOOL_MODE selMode = SBM_SELECT_RESELECT); |
| |
|
| BOOL |
ExpApiMergeSelected();
|
| BOOL |
ExpApiResizeSelected(double
dSize, BOOL bUnderSize = FALSE, BOOL bGrid = FALSE, BOOL bMerge
= FALSE); |
| BOOL |
ExpApiMergeWires();
|
| |
|
| BOOL |
ExpApiGenDLayer(LPCTSTR
szLayerName = NULL); |
| BOOL |
ExpApiGenAllDLayers();
|
| |
|
| BOOL |
ExpApiCleanCellPrimitivesDLayer();
|
| BOOL |
ExpApiCleanCellHierarchyDLayer();
|
| BOOL |
ExpApiCleanWholeProjectDLayer();
|
| |
|
| BOOL |
ExpApiCleanCellPrimitivesSLayer();
|
| BOOL |
ExpApiCleanCellHierarchySLayer();
|
| BOOL |
ExpApiCleanWholeProjectSLayer();
|
| BOOL |
ExpApiDeleteTechnologySLayers();
|
| |
|
| BOOL |
ExpApiCreateNewCellInPlace(LPCTSTR
szCellName, BOOL bInPlace = FALSE); |
| BOOL |
ExpApiExplodeSelected();
|
| BOOL |
ExpApiExplodeAll();
|
| BOOL |
ExpApiFlatten(LPCTSTR
szCellName = NULL); |
| |
|
| BOOL |
ExpApiReplaceSelectedInstances(LPCTSTR
szCellName = NULL); |
| BOOL |
ExpApiReplaceInstancesInCell(LPCTSTR
szSourceCell, LPCTSTR szTargetCell); |
| BOOL |
ExpApiReplaceInstancesInProject(LPCTSTR
szSourceCell, LPCTSTR szTargetCell); |
| |
|
| LPCTSTR |
ExpApiGetCellName(HCELL
hCell); |
| int |
ExpApiGetCellNumber(LPCTSTR
szLibName = NULL); |
| HCELL |
ExpApiGetFirstCell(LPCTSTR
szLibName = NULL); |
| HCELL |
ExpApiGetNextCell(LPCTSTR
szLibName = NULL); |
| |
|
| LPCTSTR |
ExpApiGetLayerName(HLAYER
hLayer); |
| int |
ExpApiGetLayerNumber(LPCTSTR
szCellName = NULL); |
| HLAYER |
ExpApiGetFirstLayer(LPCTSTR
szCellName = NULL); |
| HLAYER |
ExpApiGetNextLayer(LPCTSTR
szCellName = NULL); |
| |
|
| LPCTSTR |
ExpApiGetCellLayerName(HCLAYER
hLayer); |
| int |
ExpApiGetCellLayerNumber(LPCTSTR
szCellName = NULL); |
| HCLAYER |
ExpApiGetFirstCellLayer(LPCTSTR
szCellName = NULL); |
| HCLAYER |
ExpApiGetNextCellLayer(LPCTSTR
szCellName = NULL); |
| |
|
| LPCTSTR |
ExpApiGetTechLayerName(HTLAYER
hLayer); |
| int |
ExpApiGetTechLayerNumber();
|
| HTLAYER |
ExpApiGetTechFirstLayer();
|
| HTLAYER |
ExpApiGetTechNextLayer();
|
| |
|
| BOOL |
ExpApiAddTechLayer(const
LAYER_PROPERTY& Property); |
| BOOL |
ExpApiGetTechLayer(LPCTSTR
szLayerName, LAYER_PROPERTY& Property); |
| BOOL |
ExpDeleteTechLayer(LPCTSTR
szLayerName); |
| |
|
| void |
ExpApiSetSetupTechnology(const
TECHNOLOGY_SETUP& sTechSetup); |
| void |
ExpApiGetSetupTechnology(TECHNOLOGY_SETUP&
sTechSetup); |
| |
|
| void |
ExpApiSetSetupGeneral(const
GENERAL_SETUP& sGeneralSetup); |
| void |
ExpApiGetSetupGeneral(GENERAL_SETUP&
sGeneralSetup); |
| |
|
| void |
ExpApiSetSetupGDS(const
GDS_SETUP& sGDSSetup); |
| void |
ExpApiGetSetupGDS(GDS_SETUP&
sGDSSetup); |
| void |
ExpApiSetSetupCIF(const
CIF_SETUP& sCIFSetup); |
| void |
ExpApiGetSetupCIF(CIF_SETUP&
sCIFSetup); |
| |
|
| void |
ExpApiSetSetupApplicon(const
APPLICON_SETUP& sAPPLICONSetup); |
| void |
ExpApiGetSetupApplicon(APPLICON_SETUP&
sAPPLICONSetup); |
| |
|
| BOOL |
ExpApiSaveSettings(LPCTSTR
szFileName); |
| BOOL |
ExpApiLoadSettings(LPCTSTR
szFileName); |
| |
|
| HOBJECT |
ExpApiCreateBox(double
dSx, double dSy, double dEx, double dEy, LPCTSTR szLayerName = NULL)
|
| |
|
| HOBJECT |
ExpApiCreateBox(RCEAPoint
ptPos, RCEAPoint ptSize, LPCTSTR szLayerName = NULL) |
| |
|
| HOBJECT |
ExpApiCreateBox(RCEARect
rtRect, LPCTSTR szLayerName = NULL) |
double dEx, double dEy - width, height; RCEAPoint ptSize
- width, height;
LPCTSTR szLayerName -name of the layer. New object will
be created in a current layer if layer name is not given.