InterfacePCBIWindow Interface

The IPCBIWindow include this interface to give user the option to create unit tests and be flexible in your own code by using other objects instead of IPCBIWindow.

Definition

Namespace: PCBI.Automation.Interfaces
Assembly: PCB-Investigator (in PCB-Investigator.exe) Version: 0
C#
public interface InterfacePCBIWindow : IDisposable
Implements
IDisposable

Properties

ActivateCMPsOnNetSelect If a net will be selected and ActivateCMPsOnNetSelect is true the CMPs will be selected too.
BottomViewActive Get IPCBI-Window bottom view is activ.
ControlBox Determines whether the PCBI-Window has a control menu box..
HasEmbeddedDesign Is this a embedded PCB-Investigator? Embedded PCB-Investigator can not load data without one project who is included in the exe directly. Depending on the license it is possible to use the embedded PCB-Investigator with automation interface or without.
IColorsetting The ColorSettings are used for drawing.
IsDisposed Is the main window disposed?
IsPCBIVisible If this bool is true, the PCB-Investigator Window is visible.
JobIsLoaded True if a Job is loaded, false if no Job is loaded.
KeyPreview The KeyPreview from the parent mainform.
MainForm The form of the main controls.
MaximizeBox Determines whether the PCBI-Window has a maximize box in the upper-right corner of its caption bar.
MinimizeBox Determines whether the PCBI-Window has a minimize box in the upper-right corner of its caption bar.
NeedToSave Set or get the internal bool for asking user to save the design changes at closing project. This is only important if changes are made, some smaller changes do not set this bool. Most changes like delete of objects or add new objects set this bool immediately.
OriginalJobPath Get or Set the real job path for imports in different formats e.g. IPC2581 or GenCad 1.4.
ShowFreeTextInfoOnAllLayer Show info layer with free text entries. This option activate the "info on all layers" option too. By deactivate it the internal value will be set to none info layer.
ShowIcon Indicates whether the PCB-Icon is displayed in the title bar.
ShowNetInfoOnAllLayer Activate the netname info for all layers. This option activate the "info on all layers" option too. By deactivate this option it will set the internal value to none info layer.
ShowOutlineForInfoLayer Change the info layer with outline highlighting or in draw only selected mode with text for all elements. Be careful with this option, it has different handling for draw only selected and standard drawing.
ShowSizeInfoOnAllLayer Show info layer with size info entries. This option activate the "info on all layers" option too. By deactivate it the internal value will be set to none info layer.
ShowTransparentSurfaces Surfaces in transparent mode are hidden by default; you can change this by using ShowTransparentSurfaces or ask for the value if it is changed.
Size The size of the PCB-I-Window in pixel.
StartPosition Determines the position of a form when it first appears.
SuppressGUIUpdate If this bool is true, the PCB-Investigator Layer-, Drawing- and Step-Controls are not updated until this variable is set back to false
Text The text associated with the form.
UIAction execute, set enable or set visible of ui-items.
WindowState Determines the initial visual state of the form.

Methods

AddPictureLayer(Bitmap, String, Boolean) Adds an PicuteLayer to the current ODB++ Job.
AddPictureLayer(String, String, Boolean) Adds an PicuteLayer to the current ODB++ Job.
AddPictureLayer(String, String, Boolean, Boolean, Boolean) Adds an PicuteLayer to the current ODB++ Job.
CallHostChangeButton Change button check type.
CallHostChangeEnable Change enable for action item.
CallHostChangeVisible 
ClearUndoBuffer Clear the inner undo buffer. This make it impossible to undo mirror/rotation and many more actions.
ClientToWorld Calculate client to world coordinates.
ClientToWorldD Calculate client to world coordinates.
CloseJob Close the current job! The project directory will be unloaded and all used RAM will be disposed. This is not necessary if you close a new project/job the RAM cleaning will be done as well.
CreateNewJobDirectory(String) Creates a new job directory and returns the right path (with SubFolder). The name is allways gerber_job. Existing folders are overwrited. ///
CreateNewJobDirectory(String, String, String) Creates a new job directory and returns the right path (with SubFolder). Existing folders are overwrited.
CreatePreviewImage(Size) Preview image is created from outline with drills. Simple without special pads and only one drill layer. The image will be created of the loaded job, if no job is loaded the return bitmap is black. It will use the current step for pcb outline and drills.
CreatePreviewImage(Size, Boolean, Boolean, String) Preview image is created from outline with drills. Simple without special pads and only one drill layer. The image will be created of the loaded job, if no job is loaded the return bitmap is black. It will use the current step for pcb outline and drills.
FireOnJobLoadedEvent When a design is imported via a plugin, the plugin should call this function when the import is finished, to inform all other plugins and pcbi that the ddata is now complete Some plugins may then refill lists (e.g. with all components or nets)
GenerateNetList Generate Net List with option to override existing nets and add components.
GetActiveMouseTool Returns the active mouse tool type
GetAllLoadedPlugIns Create a list of all loaded plugins with name of plugins as keys.
GetBoardHeight Get height of board (from attribute).
GetCurrentPicture Creates a image of the visible area in the PCB-Investigator graphic pane.
GetCurrentRuleSets Load all settings for all available analysis plugins.
GetCurrentStep Return the current step, which is selected in PCB-I.
GetJobBounds Get the bounds of the job/profil.
GetJobInfo Get information of job, details of selection, components and repeats.
GetJobInformation Creates an class with all relevant job information.
GetJobName Get the name of the job, if it is loaded from zip/tgz the real name is given back not the temporary unpacked name.
GetJobPreviewImages Returns the Preview and Icon Image of the currently loaded design
GetMatrix Gets the matrix from the Job.
GetMPNPackageList Return the MPNPackageList of the currently loaded design or null
GetNetMode Get the current net mode.
GetObjectCountToCopy Count elements in copy list for pasting later.
GetODBJobDirectory Returns the full path of the job. Use toLowerInvariant() for compaires, because the path is like on HDD with big and small chars.
GetPlugInInstance Check for the type, if the type is loaded and a instance is created the plugin will be returned.
GetRuleSetting Load rules for PlugIn (Each plugin have his own container). Analsysis scripts are alle manged over scripting, if you change the Name from PCB-Investigator-Scripting to other name it do not find the analysis script settings again.
GetStandardRuleSets Ask all plugins for there standard rules and combine them in one rulesSet.
GetStep Return the Step with the choosen name or null if the name does not exist.
GetStepList Return a list with all used steps.
GetUnit The actual unit in PCB-Investigator window is mm.
GetVisibleArea This methode calculate the visible area in PCB-Investigator.
GetZoom After you draw a picture (in IStep) you can get the zoom from the last plotted picture.
ImportRuleSets Import setting from xml file.
LoadData(String, IPCBIWindowLoadInformation) Load data from all available formats (depending on your license).
LoadData(String, Boolean) Load data from all available formats (depending on your license).
LoadData(String, IPCBIWindowLoadInformation, FormatTypes) Load data from all available formats (depending on your license).
LoadDataAsync Load data async from all available formats (depending on your license).
LoadDataAsync2(String) Load data async from all available formats (depending on your license).
LoadDataAsync2(String, Boolean) Load data async from all available formats (depending on your license).
LoadDataFromTGZStreamAsync Load tgz data from stream e.g. use MemoryStream.
LoadDataFromZipStreamAsync Load zip data from stream e.g. use MemoryStream with zip as byte[] included. You can use folowing code to try it out: using (FileStream dataStream = new FileStream(@"D:\Daten\odb.zip", FileMode.Open)) { MemoryStream memStream = new MemoryStream(); await dataStream.CopyToAsync(memStream); memStream.Seek(0, SeekOrigin.Begin); bool res = await window.LoadDataFromZipStreamAsync(memStream); }
LoadODBJob(String) Read an ODB Job directory or ZIP/TGZ-ODB-Directory, returns false if the files not right or the path not right.
LoadODBJob(String, Boolean, Boolean) Read an ODB Job directory or ZIP/TGZ-ODB-Directory, returns false if the files not right or the path not right.
MouseToolDisabled Disable active mouse tool and change to default cursor (without selection, zoom...).
MouseToolEnabled Enable last mouse tool (it remembers last disable call).
OpenCAMInputAndSetListOfFiles Lists Gerber, Excellon and Sieb and Meyer Files in the CAM input.
OpenCAMInputWithFileFromDirectory Open CAM input and lists all Files on the window.
OpenJobLibrary Opens the Job Library Dialog. If the "regID" is a registered Commend of an "IPluginOpenDesign" plugin, the corresponding Tabpage of the "IPluginOpenDesign" is initially shown.
OpenPropertyOfComponent(ICMPObject) Show Component Properties from Component.
OpenPropertyOfComponent(InterfaceCMPObject) Show Component Properties from Component.
PasteOnLayer Paste the copyed items on the choosed layer.
SaveDataInZipStreamAsync Save ODB++ data in zip stream. The memory stream can be corrupted if a error occurs (Check error log for this case).
SaveEmbedded This Methode save an embedded PCB-Investigator job in an directory.
SaveEmbeddedAsZIP(String) This Methode save an embedded PCB-Investigator job as ZIP file.
SaveEmbeddedAsZIP(String, String) This Methode save an embedded PCB-Investigator job as ZIP file.
SaveJob Save changes (only layers with changes).
SaveJob(String) Save Job in Directory.
SaveJob(String, Boolean) Save Job in Directory.
SaveJob(String, Boolean, String) Save Job in Directory with option to do it as zip compressed directory.
SaveJobAsync Save changes asynchronous (only layers with changes).
SaveJobImperative Save Job with all opened layers, attributes, nets and packages.
SaveRuleSettings Save rule settings for all analysis plugins.
SendMessage Send a message to other plugin with information what to do.
SetJobName Set name of job for misc file.
SetRibbonMenu Set your own menu to PCB-Investigator, the xml file must be placed as memory stream.
SetRuleSetting Set rules for one plugin with the RulesContainer.
Show Shows the PCBI-Window. Notice: The first show initialize the controlls and clears the selection and put the view to default.
ShowAndCreateSymbolDefinition Show dialog to create own standard tool definitions. It is possible to create all standard elements with this symbol dialog.
ShowNotesDialog Show notes dialog for edit and switch between notes. This does not close the open dialog!
ShowNotesDialog(String, String) Show notes dialog for edit and switch between notes and initialize a new note. This does not close the open dialog!
ShowSearchAndStartIt Show search dialog and start search with this values.
ShowStatusText Show the text in status bar. After 1 second it will be cleaned.
UpdateControlsAndResetView Update layer list, stepcontrol and zoom home. Important after working in other threads and add extra controls like tabpages or menus.
UpdateSelection fire change selection event
UpdateView If you use PCB-Investigator and control it from outside, then you have to update the view after each action.
WorldToClient(PointD) Calculate world to client coordinates.
WorldToClient(PointF) Calculate world to client coordinates.
ZoomHome ZoomHome set the view in PCB-Investigator to the main rectangle view.
ZoomProfile ZoomProfile set the view in PCB-Investigator to the profile bounds.
ZoomRect(RectangleD) ZoomRect set the view in PCB-Investigator to the rectangle (if the rectangle side ratio does not apply to the window size PCB-Investigator make the view bigger).
ZoomRect(RectangleF) ZoomRect set the view in PCB-Investigator to the rectangle (if the rectangle side ratio does not apply to the window size PCB-Investigator make the view bigger).
ZoomToSelection Zoom to selected objects.

Events

PCBIActiveLayerChanged Occurs when a layer change his state (activate- or deactivatelayer).
PCBIAttributeAddedOrChanged Occurs when a attribute is added or changed to the parent IObject.
PCBIChangeButton This event occur if a button should change the check state. E.g. if a dialog is shown it should be checked.
PCBIChangeEnable This event occur if a button should change the enable state.
PCBIChangeVisible This event occur if a control should change the visible state.
PCBICloseAllWindows Occurs if user click button close all windows
PCBIComponentLayerAdded The event handler for changes in matrix, there is an cmp layer added.
PCBIDrawOnlySelectedValueCMPChanged The event handler for changes in drawonlyselected transparency.
PCBIDrawOnlySelectedValueFeaturesChanged The event handler for changes in drawonlyselected transparency.
PCBIElementsDeleted Occurs when elements are deleted from active project data.
PCBIFormClosing Occurs wheneverthe form closes, before the form has been closed and specifies the close reason.
PCBIFormDisposing Occurs wheneverthe form closes, before the form has been closed and specifies the close reason.
PCBIFormGotFocus Occurs when the form got the focus.
PCBIFormGraphicPaneDrawing Occurs when main window draw a new image.
PCBIFormKeyDown Occurs when a key is first pressed.
PCBIFormKeyPress Occurs when the form has focus and the user presses and releases a key.
PCBIFormKeyUp Occurs when a key is released.
PCBIFormLostFocus Occurs when the form lost the focus.
PCBIFormMouseWheel Handle mouse wheel of layerlist and main form.
PCBIFormResize Occurs when the form is resized.
PCBIJobClosed Is called if a job closes.
PCBIJobMatrixChanged The event handler for changes in matrix.
PCBIJobMatrixSaved The event handler for saving matrix.
PCBIJobSaved The event handler for after saving ocb++ job.
PCBIMainViewChanged Occurs if user change view e.g. from 2D to 3D view.
PCBIMouseDownInGraphicPane Occurs when user click in the graphic pane, the location has to be transformed in job coordinates (use ClientToWorld).
PCBIMouseMoveInGraphicPane Event will be raise if the mouse is moveing in grahic pane.
PCBIMouseToolChanged The event handler for changes in drawonlyselected transparency.
PCBIMouseUpInGraphicPane Occurs when user click in the graphic pane, the location has to be transformed in job coordinates (use ClientToWorld).
PCBINewJobOpend The event if a job opens.
PCBIOnNoteDragEnd This event handler is called, when an INoteBase is droped by the user
PCBIOnNoteDragStart This event handler is called, when an INoteBase is started to be dragged by the user The event hander can return a function with available Anchor Points during dragging
PCBIPropertyAddedOrChanged Occurs when a property is added or changed to the parent IObject.
PCBISelectionChanged Occurs when the selection change.
PCBIStepChanged The event handler for changes of active step.
UIActionExecuteRequest Event for action execute request.

See Also