API - Doc

In this topic: Hide

 

The only object that is created directly is the cm4dDoc object. Creating this object executes CM4D and provides an object for document manipulation. All of the other objects are created through the use of a parent object, starting with the cm4dDoc object at the root.

Doc Methods

Parameter Type Description Remarks
CloseDocument(); long     
CreateDataSet(BSTR label); IQaDataSet*                
CreateQuery(eQueryType type, BSTR label); IQaQuery*                  
CreateQueryDS(short type, BSTR queryLabel, BSTR dataSourceLabel); IQaDbDataSource*           
CreateScore(BSTR label); IQaScore*                  
CreateSheetSet(BSTR label); IQaSheetSet*               
CreateStyle(BSTR label); IQaStyle*                  
CreateWireframe(BSTR filename); IQaWireframe*              
FrameMaximize(); void     
FrameMinimize(); void     
FrameRestore(); void     
GetCM4DDatabaseSchema(); float      
GetCM4DVersion(); double     
GetDataSet(BSTR label); IQaDataSet*                
GetDataSetByPos(long pos); IQaDataSet*                
GetDataSetCount(); long     
GetDataSourceByPos(long pos_); IQaDbDataSource*           
GetDataSourceCount(); long     
GetDocVersion(); double     
GetErrorString(long code); BSTR     
GetFilename(); BSTR     
GetImages(void); IQaImages*              Returns an object representing the QaImages list.  
GetLastErrorCode(); short    
GetManagedDocumentByFilename(BSTR filename_); IQaManagedDocument*     Get a Managed Document from the loaded list by Filename (full path or filename)  
GetManagedDocumentByID(BSTR id_); IQaManagedDocument*     Get a Managed Document from the loaded list by Managed Document unique identifier.  
GetManagedDocumentByName(BSTR name_); IQaManagedDocument*     Get a Managed Document from the loaded list by Name.  
GetManagedDocumentByPos(LONG position_, BSTR siteCode_); IQaManagedDocument*     Get a Managed Document from the loaded list by list position within a specific Site Code.  A passed Site Code value of “*” will be taken to mean within all loaded sites. An empty Site Code value “” will be taken to mean within the authenticated user’s default site.
GetManagedDocumentCount(BSTR siteCode_); LONG  Get Managed Document list count.  
GetPriviledgeByPos(long pos_, BSTR sitecode_); BSTR     
GetPriviledgeCount(BSTR sitecode_); long     
GetQuery(BSTR label); IQaQuery*                  
GetQueryByPos(long pos); IQaQuery*                  
GetQueryCount(); long     
GetSchedulerDataSource();  IQaSchedulerDataSource*    
GetScore(BSTR label); IQaScore*                  
GetScoreByPos(long pos); IQaScore*                  
GetScoreCount(); long     
GetSheet(BSTR label); IQaSheet*                  
GetSheetByPos(long pos); IQaSheet*                  
GetSheetCount(); long     
GetSheetSet(BSTR sheetSetLabel); IQaSheetSet*               
GetSheetSetByPos(long pos); IQaSheetSet*               
GetSheetSetCount(); long     
GetSiteByCode(BSTR siteCode_); IQaSiteConfiguration*   Get Site Configuration by Site Code.  
GetSiteByLabel(BSTR siteLabel_); IQaSiteConfiguration*   Get Site Configuration by Site Label.  
GetSiteByPos(LONG position_); IQaSiteConfiguration*   Get Site Configuration by list position.  
GetSiteCodesByPos(long pos_); BSTR     
GetSiteCodesCount(); long     
GetSiteCount(void); LONG  Get Site Configuration list count.  
GetSiteDatabaseSchema(); float      
GetStyle(BSTR label); IQaStyle*                  
GetStyleByPos(long pos); IQaStyle*                  
GetStyleCount(); long     
GetWireframe(BSTR filename); IQaWireframe*              
GetWireframeByPos(long pos); IQaWireframe*              
GetWireframeCount(); long     
HideDocument(); long     
IsDocManaged(); boolean  Get Managed Document setting.  
IsDocPathUNC(BSTR path_); boolean    This method determines whether the passed path is a UNC Path. If an empty path is
passed the path of the current opened document is used if any.
LoadManagedDocumentByFilename(BSTR filename_); IQaManagedDocument*     Load Managed Documents for the given filename. Event Choices, Report Choices, and Managed Routines are loaded for the selected document.
LoadManagedDocumentByID(BSTR id_); IQaManagedDocument*     Load Managed Document by unique identifier.  Event Choices, Report Choices, and Managed Routines are loaded for the selected document.
LoadManagedDocuments(BSTR siteCode_, boolean loadSubordinates_); LONG    Loading Managed Documents obtains a representation of the requested managed documents into the internal CM4D API memory list. This list will not allow any duplicates to be loaded and any attempt to do so will cause the older copy to be removed from the list and the new copy to be added. Keep this in mind for QaManagedDocument objects that were obtained prior to a call to this method (or other variations of this method) as they may no longer be valid. This method clears the CM4D API memory list and loads Managed Documents for the given site code. A passed Site Code value of “*” will be taken to mean all sites. An empty Site Code value “” will be taken to mean the authenticated user’s default site. Event Choices, Report Choices, and Managed Routines can be loaded by passing “True” for the loadSubordinates_ parameter. Loading a managed document does not open the represented CM4D Document nor does it affect any CM4D document that is open. A loaded Managed Document is available on the internal list for subsequent GetManagedDocument… calls.
MakeSnapShots(short res_); long     
ManageCurrentDocument(BSTR name_, BSTR filename_, BSTR siteCode_, eManagedAsType type_); LONG  Manage the current document.  This method will manage the current unmanaged document using the parameters passed and save the document using the provided filename. The Site Database is updated to reflect the change. A Universal Naming Convention (UNC) filename path maybe required by the system configuration.
ManageCurrentDocumentAs(BSTR name_, BSTR filename_, BSTR siteCode_, eManagedAsType type_); LONG  Manage the current document as a copy of the current document. The Site Database is updated to reflect the change. This method will manage the current managed document using the parameters passed and save the document as a new document using the provided filename. The original managed document is unchanged and the current document becomes the newly saved document. The Site Database is updated to reflect the change. A UNC filename path maybe required by the system configuration.
NewDataSource(); IQaDbDataSource*           
NewDocument(BSTR filename); long     
OpenDocument(BSTR documentName); long     
OpenOldDocument(BSTR documentName); long     
ProcessEvents(); long     
ReloadEligibleAnnots();   long     
SaveAsDocument(BSTR documentName); long     
SaveDocument(); long     
ShowDocument(); long     
ShutDownCM4D(); void     
SiteDatabase(); BSTR     
UnloadManagedDocument(BSTR id_); LONG  Unload Managed Document by unique identifier. The identified Managed Document is removed from the CM4D API internal list.
UnLoadManagedDocuments(BSTR siteCode_); LONG    This method unloads (removes from the internal CM4D API list) Managed Documents for the given site code. A passed Site Code value of “*” will be taken to mean all sites. An empty Site Code value “” will be taken to mean the authenticated user’s default site.
UnmanageCurrentDocument(void); LONG  This method un-manages the current document.  The current document management settings are cleared and the document is saved as an unmanaged document. The Site Database is updated to reflect the change.
Update(); long     
UpdateDatabase(void); LONG    This method updates changes to Site Configurations and Managed Documents to the Site Database. If a CM4D Document is open it is saved to update the Managed Document event choice, report choice, and managed routine information.

Doc Properties

Parameter Type Description Remarks
AllowAnnotOffSheet; boolean     
AllowAnnotSelectByTerminator; boolean     
AnnotErrorHandling; eAnnotErrorHandling     
AxisLabelX; BSTR     
AxisLabelY; BSTR     
AxisLabelZ; BSTR     
ChrNorLabel; BSTR     
ChrPosLabel; BSTR     
ComparePrecision; long     
DecimalPlaces; long     
DrawBlackAndWhite; boolean     
OpenWritable; boolean     
ScriptAnnot; IQaAnnot*     
ScriptSheet; IQaSheet*     
ShowAnnotGhostBorder; boolean     
SuspendQueryRefresh; boolean     
SuspendResolve; boolean     
Units; eUnits     
UseViewSnapshots; boolean     
ViewRotationAngle; double     

Doc Enumerators

Units - eUnits

Parameters Help String Description Remarks
eUnitsInches Inches         
eUnitsMillimeters = 1, Millimeters    

Error Handling - eAnnotErrorHandling

Parameters Help String Description Remarks
eAnnotErrorHandlingAppendCode, Append Code       
eAnnotErrorHandlingAppendE, Append 'E'        
eAnnotErrorHandlingAppendMessage, Append Message    
eAnnotErrorHandlingLeaveEmpty Leave Empty       
eAnnotErrorHandlingNone = 0, None