www.kxcad.net Home > Electronic Index > Altium(Protel) Index
Overview
The IProject interface deals with an open project in DXP. There are project and document variants, that is actually a project or document can be specified to have project or document variants (actual project / document variants do not exist) and on these document variants have component variants.
To have access to the data of a project, you need to do a compile first. Projects deal with logical and physical documents. Logical documents are the connected documents which are part of a design which include a PCB document associated with this design. Physical documents are source documents expanded by the DXP compiler as in a flattened design project.
Thus, a project contains source documents and implementation documents. To have access to the most current data of a project, you need to compile the project first. The compiler maps (or expands) all the logical source documents into physical documents.
Normally there is a one logical document to a one physical document for a simple flat design project, but for hierarchical design projects (for example multi channel projects), the documents that have sheet symbols with a Repeat statement, then logical documents are expanded into multiple physical documents.
There are Output jobs consisting of available output generators installed in DXP.
Interface Methods table
|
Method |
Description |
|
Function DM_ProjectVariants (Index : Integer ) : IDocumentVariant; |
Returns the indexed IProjectVariant interface. A project variant interface is only a conceptual representation of a project that can have project variants. That is there is only one physical board but this same board can have certain components disabled or enabled leading to document variants. The variations of a PCB board are referred to as the IDocumentVariant and to check which components are enabled or not for this particular document variant, check out the IComponentVariant interface. This is to be used in conjunction with the DM_ProjectVariantCount method. |
|
Function DM_GeneratedDocuments (Index : Integer ) : IDocument; |
Returns the indexed generated document which is generated by the Output Generator. |
|
Function DM_LogicalDocuments (Index : Integer ) : IDocument; |
Returns the indexed logical document of a project. |
|
Function DM_PhysicalDocuments (Index : Integer ) : IDocument; |
Returns the indexed physical document of a project. |
|
Function DM_SearchPaths (Index : Integer ) : ISearchPath; |
Returns the indexed search path object defined for this project. |
|
Function DM_Configurations(Index : Integer) : IConfiguration; |
Returns the indexed configuration of a FPGA project. A configuration can have a list of different constraint files. |
|
Function DM_Outputers (Name : WideString) : IOutputer; |
Returns the indexed Output Generator. An output generator could be a Simple BOM. |
|
Function DM_ProjectVariantCount : Integer; |
Returns the number of project variants for this current project. |
|
Function DM_GeneratedDocumentCount : Integer; |
Returns the number of generated documents such as those documents generated by the OutPut generator (from a OutJob document). Use this function in conjunction with the DM_GeneratedDocuments function. |
|
Function DM_LogicalDocumentCount : Integer; |
Returns the number of logical documents which represent the actual documents of a design project (documents that exist in the design project but are not part of the design are not logical documents). Use this function in conjunction with the DM_LogicalDocuments function. |
|
Function DM_PhysicalDocumentCount : Integer; |
Returns the number of physical source documents (which are expanded logical documents of the design project). Source documents are usually schematic documents. Use this function in conjunction with the DM_PhysicalDocuments function. |
|
Function DM_SearchPathCount : Integer; |
Returns the number of search paths for this current project. Use this function in conjunction with the DM_SearchPaths function. |
|
Function DM_ConfigurationCount : Integer; |
To be used in conjunction with DM_Configurations function. |
|
Function DM_IndexOfSourceDocument(Filename : WideString) : Integer; |
Returns the index of the source document based on the filename of this document. This is for hierarchical or connected schematic documents. |
|
Procedure DM_MoveSourceDocument (Filename : WideString; NewIndex : Integer); |
This procedure re-assigns the source document referenced by the filename a new index number. |
|
Procedure DM_AddConfigurationParameters(Configuration : WideString); |
A configuration is a list of constraints file which manages the mapping of pins to ports of a FPGA project. Invoke this method to add parameters of a specified configuration file for a FPGA project. |
|
Procedure DM_AddConfigurationParameters_Physical(Configuration : WideString); |
A configuration is a list of constraints file which manages the mapping of pins to ports of a FPGA project. Invoke this method to add parameters of a specified configuration file for a FPGA project. |
|
Procedure DM_AddGeneratedDocument (Filename : WideString); |
This procedure adds a new generated document referenced by its filename parameter in this current project, and this document appears in the Generated folder of this project on DXP Projects panel. |
|
Procedure DM_AddSourceDocument (Filename : WideString); |
This procedure adds a source document referenced by its filename parameter in the current project. |
|
Procedure DM_AddControlPanel (Filename : WideString); |
Add a document to the main section of the the panel which could be part of a project or free documents. |
|
Procedure DM_RemoveSourceDocument (Filename : WideString) |
This procedure removes a source document referenced by its filename from this current project. |
|
Procedure DM_AddSearchPath (SearchPath : WideString; IncludeSubFolders : Boolean); |
This procedure adds a new serach path for the current project. |
|
Function DM_ProjectFullPath : WideString; |
This function returns the full path of this current project in DXP. |
|
Function DM_ProjectFileName : WideString |
This function returns the file name of this current project in DXP. |
|
Function DM_HierarchyMode : TFlattenMode; |
This function returns the hierarchy mode as a TFlattenMode parameter. |
|
Function DM_TopLevelLogicalDocument : IDocument; |
This function returns the top level logical document of this current project. A logical document is usually a Schematic document and can represent a document of a multi channel project for example. |
|
Function DM_TopLevelPhysicalDocument : IDocument; |
This function returns the top level physical document of this current project. A physical document usually is a PCB document. |
|
Function DM_ComponentMappings (AnImplementationDocument : WideString) : IComponentMappings |
Returns the IComponentMapping interface which details which PCB components are linked to Schematic components. Check the IComponentMappings interface. |
|
Function DM_DocumentFlattened : IDocument; |
Returns the flattened document. A flattened document is part of a flattened hierarchy of a project and all objects of this project appear in the Instance list of the Navigator panel. |
|
Function DM_PrimaryImplementationDocument : IDocument; |
Returns the primary implementation document for example PCB documents. Source documents are Schematic documents for example. |
|
Function DM_CurrentProjectVariant : IDocumentVariant; |
Returns the current project variant from this current project. Check out the IProjectVariant interface. |
|
Function DM_ViolationCount : Integer; |
This function returns the number of violations reported by DXP for this current project. |
|
Function DM_Violations(Index : Integer) : IViolation; |
Returns the indexed violation for a current project. This is to be used in conjunction with the DM_ViolationCount method. |
|
Function DM_ErrorLevels(AErrorKind : TErrorKind) : TErrorLevel; |
Returns the error level for the specified error type. For each violation type, you can have up to four different error levels, No Report, Warning, Error and Fatal Error with four different colored folders. |
|
Function DM_GetDocumentFromPath(DocumentPath : WideString) : IDocument; |
This function returns the IDocument interface associated with the document path parameter. Otherwise a Nil value is returned. |
|
Function DM_ChannelDesignatorFormat : WideString; |
This function returns the formatted channel designator string. This string is basedon the settings defined in the Multi-Channel page of the Options for Project dialog from the Project » Project Options menu item. |
|
Function DM_ChannelRoomLevelSeperator : WideString; |
Returns the separator character for the Channel Room Level string. The default is an underline character used for room naming styles when there are paths (based on hierarchical designs). |
|
Function DM_ChannelRoomNamingStyle : TChannelRoomNamingStyle; |
Returns the TChannelRoomNamingStyle type. There are alternative styles for naming rooms on a PCB document. |
|
Procedure DM_StartNavigation; |
This procedure invokes the navigation panel for the current project. The project needs to be compiled first. |
|
Procedure DM_StartCrossProbing(CtrlDoesSwitch : Boolean); |
This procedure invokes the cross probing function. Both source and primary implementation documents need to be open in DXP in order for the cross probing to work. |
|
Procedure DM_DoCrossSelection |
Activates the cross probing function where you can jump from a Schematic object to its corresponding PCB object (both source and primary implementation documents need to be open in DXP). |
|
Function DM_NavigationZoomPrecision : Integer |
Sets how precise the document zoom is when the interactive navigator is being used to trace the connection in a project. |
|
Function DM_InitializeOutputPath(AnOutputType : WideString) : WideString; |
Returns the output path for the Output Generator based on the AnOutputType parameter. |
|
Procedure DM_SetOutputPath (AnOutputPath : WideString); |
Sets the output path for generated documents to go in by the DXP output generator. |
|
Function DM_GetOutputPath : WideString; |
Returns the output path for generated documents for the current project. |
|
Function DM_Compile : LongBool; |
Invoke this function to compile the current project. Once the project is compiled, navigation of nets and comparing the differences of documents and other tasks can be performed. |
|
Function DM_CompileEx(All : LongBool; Var Cancelled : LongBool) : LongBool; |
Invoke this function to compile all documents of all opened projects in DXP. Pass a Boolean parmeter in to cancel the compiling process. |
|
Function DM_EditOptions(DefaultPage : WideString) : LongBool; |
|
|
Function DM_UpdateConstraints : LongBool; |
Invoke this function to update the constraint files used for a FPGA project and for corresponding PCB projects with FPGA components. |
|
Function GetNavigationHistory : INavigationHistory; |
This function returns the status of the navigation buttons on the Navigator panel for the current project in DXP. Check out INavigationHistory interface for details. |
|
Function DM_OptionsStorage : IOptionsStorage; |
|
|
Function DM_ToDoManager : IToDoManager; |
Invoke this function to have access to the IToDoManager object. This ToDo manager allows you to define to dos for your current project. |
|
Procedure DM_SetAsCurrentProject; |
Invoke this function to set the project as the current project in DXP. |
|
Function DM_GetAllowPortNetNames : Boolean; |
Invoke this function to check whether port net names are used for navigation in DXP or not. |
|
Function DM_GetAllowSheetEntryNetNames : Boolean; |
Invoke this function to check whether sheet entry net anmes are used for navigation in DXP or not. |
|
Function DM_GetAppendSheetNumberToLocalNets : Boolean; |
Invoke this function to check whether sheet numbers are appended to local nets or not. |
|
Procedure DM_SetAllowPortNetNames (AAllow : Boolean); |
Invoke this procedure to allow port net names be used for navigation. |
|
Procedure DM_SetAllowSheetEntryNetNames (AAllow : Boolean); |
Invoke this procedure to allow sheet entry net names be used for navigation in DXP. |
|
Procedure DM_SetAppendSheetNumberToLocalNets (AAppend : Boolean); |
Invoke this procedure to have the ability to append sheet numbers to local nets on a document / project. |
|
Procedure DM_SetHierarchyMode (AFlatten : TFlattenMode); |
Invoke this function to set which hierarchy mode for this project. It can be one of the following modes: eFlatten_Smart,eFlatten_Flat,eFlatten_Hierarchical,eFlatten_Global |
|
Function DM_GetScrapDocument(DocumentPath : WideString) : IDocument; |
Returns the scrap document for the project. A scrap document is a temporary document used when creating a new document and once a document is saved, the contents of the scrap document is copied and freed. |
|
Function DM_GetConfigurationByName(Configuration : WideString) : IConfiguration; |
Returns you the configuration object for the project (normally for FPGA projects) if configuration parameter is valid. A configuration file contains mapping information to link from a FPGA project to a linked PCB project. |
|
Function DM_GetDefaultConfiguration : IConfiguration; |
Returns the default configuration for a FPGA project. |
|
Function DM_GetDefaultConfigurationName : WideString; |
Returns the name of the default configuration for a FPGA project |
|
Procedure DM_SetDefaultConfigurationName(Configuration : WideString); |
Sets the name for the default configuration of a FPGA project. |
See also