Contact Us
Contact our corporate or local offices directly.
Parent page: Altium NEXUS API Reference
This section of the Altium NEXUS API documentation provides a detailed reference of the Workspace Manager API interfaces.
The WorkSpace Manager (WSM) Application Programming Interface reference covers the Workspace manager object interfaces from the Workspace Manager Object Model.
The workspace manager interfaces exist as long there are associated existing objects in memory, thus when writing a script or server code, you have the responsibility of checking whether the interface you wish to query exists or not before you proceed to invoke the interface's methods.
You will have to ensure that the design project is compiled first otherwise the workspace manager interfaces are in an invalid state and will be returning nil values.
The workspace manager provides a bridge between source documents (such as Schematic documents) and its corresponding primary implementation documents (such as PCB documents). This workspace manager provides you information on how a project is structured, and information on nets and its associated net aware objects of source and implementation documents.
The IWorkSpace interface deals with projects, documents and objects on the open documents. To use workspace interfaces, the project needs to be compiled first refreshing all the linkages and nets up to date.
An important note, there are logical and physical documents; these terms are used to differentiate the documents in multi-channel projects. A multi channel design means that a single sheet is referenced repeatedly for a channel design. This sheet is called a logical document. A physical document (usually a PCB document) has components with unique names within a room which is mapped to a channel on a Schematic sheet. So a multi channel design translates to multiple rooms with components with unique physical designators on a PCB.
A physical designator of a PCB component is calculated to have the hierarchy path of a schematic project as well as the logical designator of the associated Schematic component to ensure that this designator for the PCB component is unique.
Example
Obtaining the project path from the current IProject interface.
// Get WSM interface (the shell of the WorkSpace Manager interface).
WSM := GetWorkSpace;
If WSM = Nil Then Exit;
Document := WSM.DM_Document;
If Document = Nil The Exit;
Project := Document.DM_Project;
Script Examples
There are script examples in the \Examples\Scripts\WSM
folder
To have access to the workspace interface object which represents the workspace manager in Altium NEXUS, you need to invoke the GetWorkspace function first. This function returns you the IWorkspace interface object. An object interface is just a means of access to an object in memory.
The workspace manager provides a bridge between source documents (such as Schematic documents) and its corresponding primary implementation documents (such as PCB documents). This workspace manager provides you the ability to manipulate the contents of a design project in Altium NEXUS.
A sample of the workspace manager interfaces:
Contact our corporate or local offices directly.