AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |
Back to Blog
Res workspace manager api3/25/2023 ![]() See the script examples in the Scripts\DelphiScript Scripts\DXP\ folder. There are two ways you can compile the project which are shown below.Ĭompile with Project.DM_Compile example Procedure CompileProject Begin Project := GetWorkspace.DM_FocusedProject If Project = Nil Then Exit Project.DM_Compile FileName := Project.DM_ProjectFullPath End Ĭompile example using the MessageRouter_SendCommandToModule call GetMem(P, 4048) SetState_Parameter(P,'Action','Compile') SetState_Parameter(P,'ObjectKind', 'Project') MessageRouter_SendCommandToModule('WorkspaceManager:Compile',P,4048,Nil) FreeMem(P) įor detailed information on Workspace Manager API, refer to the Technical Reference - Workspace Manager API document. Using the GetWorkSpace function in a DelphiScript Var i : Integer Document : IDocument Project : IProject Begin Project := GetWorkspace.DM_FocusedProject If Project = Nil Then Exit For i := 0 To Project.DM_LogicalDocumentCount - 1 Do Begin Document := Project.DM_LogicalDocuments(i) ShowMessage(Document.DM_DocumentKind) End End Compiling a ProjectĪ project needs to be compiled first so you can have access to the most current data which provides a snapshot of the latest status of a design project. With this interface, you can extract extra information about a project and its associated documents and their design objects on them. The Function GetWorkspace : IWorkspace returns the Workspace Manager interface object within your server project. Pin, Port, Netlabel, Sheet entry and Power Object Interfaces are direct representations of the INetItem interface so these objects can be part of a net. The INetItem interface is the parent interface for the Cross interface.So there are INet interfaces representing nets on a document. ![]() The INet interface is a container storing Net aware objects (which are INetItem interfaces) that have the same net property.The IECO interface represents the Engineering Change Order system in PCB and Schematic editors.The IComponentMappings interface is used for the Signal Integrity models mapping to Schematic components.The IDocument interface represents a document in Altium Designer.This component is represented by this IComponent interface. The IPart interface represents a part of a multi-part component.The IProject interface represents the current project in Altium Designer.For example the IWorkSpace interface has a DM_OpenProject function which returns a currently open or currently focussed IProject interface. The IWorkSpace interface is the top level interface and contains many interfaces within.The IDMObject interface is the ancestor interface used for many Workspace interfaces.Simplified Workspace Manager Object hierarchy To have access to data within the Workspace Manager, you need to have access to the IWorkSpace interface object which references the workspace manager. The document interfaces in the Workspace Manager can refer to documents which may not be open in Altium Designer, whereas the IServerDocument interfaces only references loaded documents in Altium Designer. This Workspace Manager also provides you with the ability to manipulate the contents of a design project in Altium Designer. This Workspace Manager provides information on how a project is structured, information on nets and its associated net aware objects of source and implementation documents. The Workspace Manager provides project functionality of grouping of files and provides a bridge between source documents (such as Schematic documents) and its corresponding primary implementation documents (such as PCB documents). The Workspace Manager is a system extensions server which is always running when Altium Designer is loaded in memory. Parent page: Using the Altium Designer API Using the Workspace Manager Interfaces
0 Comments
Read More
Leave a Reply. |