- Created by Jules, last modified on Dec 11, 2013
Question
What are the different expressions I can use to access the numerous database fields so that I can put them on a report?
Answer
Most of the expressions to access the different database fields are available in the ArtiosCAD Calculated Text table. This document can serve as a supplemental reference for those expressions, to explain how they work, what parameters they accept and any of their nuances. Please note that there are different fields between the Standard and Enterprise editions of ArtisoCAD.
Standard Edition
The following functions are available to access the various database fields:
- DBGET - access to design level information, design owner, design customer, design designer and design salesperson
- DBGETUSR - access to userfields
- DBGETREV - function for accessing revision history
- DBPROJ - function for accessing project level information
Project Bill Of Material Functions
- PROJBOM - returns Bill Of Material information as real/float values
- PROJBOMT - returns Bill Of Material information as text
- PROJBOMSUM - returns Bill Of Material totals
Characteristics - there is no direct function to access design characteristics. There is however a library function available which returns a comma separated list of the characteristics. The expression is: TLIBRARY(LIBDBSTYLE.TXT)
DATECONV - function for doing various date format conversions
DBGET
The main expression to get many of the primary database fields is DBGET. This function accepts two parameters and returns the database field as indicated below
DBGET(ENTITY,VARIABLE)
The first parameter is the sub-entity and can be one of the following values:
- DESIGN - for design level information
- OWNER - for design-owner level information
- CUST - for design-customer level information
- DSGNR - for design-designer level information
- SLSPN - for design-salesperson level information
Entity = DESIGN
e.g. DBGET(DESIGN,REV$) - returns the current revision letter
Variable | Returns |
---|---|
AUTHR$ | Authorization |
DBID$ | Database ID |
DESC$ | Description |
LPRVC$ | Original Laserpoint revision character |
NAME$ | Design Name |
OPATH$ | Original pathname |
PATH$ | Current pathname |
RESNM$ | Resource name |
RESDR$ | Resource path |
REV$ | Current revision letter |
RVDAT$ | Revision date, of the form YYYY-MM-DD |
RVSUM$ | Revision description |
SDSC1$ | Short description 1 |
SDSC2$ | Short description 2 |
SDSC3$ | Short description 3 |
SVDAT$ | Saved date, of the form YYYY-MM-DD |
There are also some other non-text variables which can be directly accessed using the DBREC variable
Variable | Returns |
---|---|
DBREC.LYRUN | Layout run length (manufacturing only) |
DBREC.REV | Revision number |
DBREC.RSCID | Database Resource ID |
Entity = OWNER
e.g. DBGET(OWNER,NAME$) - returns the design-owner name
Variable | Returns |
---|---|
ADDR1$ | Owner address1 |
ADDR2$ | Owner address2 |
CITY$ | Owner city |
CNTRY$ | Owner country |
FAX$ | Owner fax number |
LOC$ | Owner location |
NAME$ | Owner name |
NUMBR$ | Owner number |
PHONE$ | Owner phone number |
STATE$ | Owner state |
TYPE$ | Owner company type description |
ZIP$ | Owner zip code |
There are also some other non-text variables which can be directly accessed using the DBREC.OWNER variable
Variable | Returns |
---|---|
DBREC.OWNER.KEYID | Database Record ID |
Entity = CUST
e.g. DBGET(CUST,NAME$) - returns the design-customer name
Variable | Returns |
---|---|
ADDR1$ | Customer address1 |
ADDR2$ | Customer address2 |
CITY$ | Customer city |
CNTRY$ | Customer country |
FAX$ | Customer fax number |
LOC$ | Customer location |
NAME$ | Customer name |
NUMBR$ | Customer number |
PHONE$ | Customer phone number |
STATE$ | Customer state |
TYPE$ | Customer company type description |
ZIP$ | Customer zip code |
There are also some other non-text variables which can by directly accessed using the DBREC.CUST variable
Variable | Returns |
---|---|
DBREC.CUST.KEYID | Database Record ID |
Entity = DSGNR
e.g. DBGET(DSGNR,LNAME$) - returns the design-designer last name
Variable | Returns |
---|---|
ADDR1$ | Designer company address1 |
ADDR2$ | Designer company address2 |
CITY$ | Designer company city |
CNAME$ | Designer company Name |
CNTRY$ | Designer company country |
FAX$ | Designer company fax number |
FNAME$ | Designer first name |
LNAME$ | Designer last name |
LOC$ | Designer company location |
NUMBR$ | Designer company number |
PHONE$ | Designer company phone number |
SNAME$ | Designer short name |
STATE$ | Designer company state |
TYPE$ | Designer company type description |
ZIP$ | Designer company zip code |
There are also some other non-text variables which can by directly accessed using the DBREC.DSGNR variable
Variable | Returns |
---|---|
DBREC.DSGNR.KEYID | Database Record ID |
Entity = SLSPN
e.g. DBGET(SLSPN,FNAME$) - returns the design-salesperson first name
Variable | Returns |
---|---|
ADDR1$ | Salesperson company address1 |
ADDR2$ | Salesperson company address2 |
CITY$ | Salesperson company city |
CNAME$ | Salesperson company Name |
CNTRY$ | Salesperson company country |
FAX$ | Salesperson company fax number |
FNAME$ | Salesperson first name |
LNAME$ | Salesperson last name |
LOC$ | Salesperson company location |
NUMBR$ | Salesperson company number |
PHONE$ | Salesperson company phone number |
SNAME$ | Salesperson short name |
STATE$ | Salesperson company state |
TYPE$ | Salesperson company type description |
ZIP$ | Salesperson company zip code |
There are also some other non-text variables which can be directly accessed using the DBREC.SLSPN variable
Variable | Returns |
---|---|
DBREC.SLSPN.KEYID | Database Record ID |
DBGETUSR
Use this expression to access userfield values. This function accepts two parameters and returns the current value of the userfield specified.
DBGETUSR(UFTYPE,UFID)
The first parameter (UFTYPE) defines the category of userfield:
- 1 - for design userfields
- 2 - for manufacturing userfields
- 3 - for project level userfields
The second parameter (UFID) is the userfield ID as defined in DataCenter Admin.
e.g. DBGETUSR(1,99) - returns the current value of the design userfield with ID=99
This function will return the textual representation of the userfield (in current units) based on the Format specified for the userfield in DataCenter Admin.
DBGETREV
Use this expression to get revision history information. This function accepts two parameters and returns the field as specified below:
DBGETREV(VARIABLE,REVOFFSET)
The first parameter (VARIABLE) defines the field to return:
- REV$ - returns the revision letter for the specified revision
- DESC$ - returns the description for the specified revision
- AUTHR$ - returns the authorization for the specified revision
- RVDAT$ - returns the date the revision was created, in the form YYYY-MM-DD
- SVDAT$ - returns the date the revision was last saved, in the form YYYY-MM-DD
- RVSUM$ - returns the revision summary for the specified revision
- SDSC1$ - returns short description 1 for the specified revision
- SDSC2$ - returns short description 2 for the specified revision
- SDSC3$ - returns short description 3 for the specified revision
The second parameter (REVOFFSET) specifies which revision to access. There are two approaches here: accessing the revision as an offset from the current revision or accessing the revision based on its absolute position:
- REVOFFSET <= 0 - selects revision offset from the current revision
- REVOFFSET > 0 - selects absolute revision (1-based)
e.g. DBGETREV(DESC$,0) - returns the description for the current revision
e.g. DBGETREV(DESC$,2) - returns the description for Revision 1 (A)
DBPROJ
The main expression to get many of the project level database fields is DBPROJ. This function accepts two parameters and returns the database field as indicated below
DBPROJ(ENTITY,VARIABLE)
The first parameter is the sub-entity and can be one of the following values:
- PROJECT - for project level information
- OWNER - for project-owner level information
- CUST - for project-customer level information
- DSGNR - for project-manager level information
- SLSPN - for project-salesperson level information
Entity = PROJECT
e.g. DBPROJ(PROJECT,NAME$) - returns the project name
Variable | Returns |
---|---|
CRDAT$ | Project creation date (short localized format) |
DESC$ | Project description |
MDDAT$ | Project modified date (short localized format) |
NAME$ | Project name |
STYLS$ | Project characteristics (comma seperated list) |
Entity = OWNER
e.g. DBPROJ(OWNER,NAME$) - returns the project-owner name
Variable | Returns |
---|---|
ADDR1$ | Owner address1 |
ADDR2$ | Owner address2 |
CITY$ | Owner city |
CNTRY$ | Owner country |
FAX$ | Owner fax number |
LOC$ | Owner location |
NAME$ | Owner name |
NUMBR$ | Owner number |
PHONE$ | Owner phone number |
STATE$ | Owner state |
TYPE$ | Owner company type description |
ZIP$ | Owner zip code |
Entity = CUST
e.g. DBPROJ(CUST,NAME$) - returns the project-customer name
Variable | Returns |
---|---|
ADDR1$ | Customer address1 |
ADDR2$ | Customer address2 |
CITY$ | Customer city |
CNTRY$ | Customer country |
FAX$ | Customer fax number |
LOC$ | Customer location |
NAME$ | Customer name |
NUMBR$ | Customer number |
PHONE$ | Customer phone number |
STATE$ | Customer state |
TYPE$ | Customer company type description |
ZIP$ | Customer zip code |
Entity = DSGNR
e.g. DBPROJ(DSGNR,LNAME$) - returns the project-manager last name
Variable | Returns |
---|---|
ADDR1$ | Manager company address1 |
ADDR2$ | Manager company address2 |
CITY$ | Manager company city |
CNAME$ | Manager company Name |
CNTRY$ | Manager company country |
FAX$ | Manager company fax number |
FNAME$ | Manager first name |
LNAME$ | Manager last name |
LOC$ | Manager company location |
NUMBR$ | Manager company number |
PHONE$ | Manager company phone number |
SNAME$ | Manager short name |
STATE$ | Manager company state |
TYPE$ | Manager company type description |
ZIP$ | Manager company zip code |
Entity = SLSPN
e.g. DBPROJ(SLSPN,FNAME$) - returns the project-salesperson first name
Variable | Returns |
---|---|
ADDR1$ | Salesperson company address1 |
ADDR2$ | Salesperson company address2 |
CITY$ | Salesperson company city |
CNAME$ | Salesperson company Name |
CNTRY$ | Salesperson company country |
FAX$ | Salesperson company fax number |
FNAME$ | Salesperson first name |
LNAME$ | Salesperson last name |
LOC$ | Salesperson company location |
NUMBR$ | Salesperson company number |
PHONE$ | Salesperson company phone number |
SNAME$ | Salesperson short name |
STATE$ | Salesperson company state |
TYPE$ | Salesperson company type description |
ZIP$ | Salesperson company zip code |
PROJBOM
Returns Bill Of Material information as real/float values. This function takes one parameter
PROJBOM(option)
option | returns |
---|---|
1 | 1-based Bill of Materials document index |
2 | Bill of Materials document quantity |
3 | Total number of Bill of Materials documents |
4 | Total number of Bill of Materials pages |
5 | Current of Bill of Materials page |
e.g. PROJBOM(3) - returns the total count of documents included on the Bill of Materials
PROJBOMT
Returns Bill Of Material information as text values. This function takes one parameter
PROJBOM(option)
option | returns |
---|---|
1 | The print item name |
e.g. PROJBOMT(1) - returns the print item name for the current document included on the Bill of Materials
PROJBOMSUM
Returns Bill Of Material totals as float/real values. This function takes an expression as the single parameter
PROJBOMSUM(expression)
The expression is a valid interact real expression (in quotes) which will get evaluated against every document included in the Bill of Materials and the sum returned.
e.g. PROJBOMTSUM("#LENRULE") - returns the total rule length across all the documents included in the Bill of Materials.
Enterprise Edition
The following functions are available to access the various database fields:
- DBGET - access to design level information, design owner, design customer, design designer and design salesperson
- DBGETATT - access to attributes
- DBGETREV - function for accessing version/revision history
- DBPROJ - function for accessing project level information
Project Bill Of Material Functions works exactly as they do in the Standard edition
- PROJBOM - returns Bill Of Material information as real/float values
- PROJBOMT - returns Bill Of Material information as text
- PROJBOMSUM - returns Bill Of Material totals
Characteristics - there is no direct function to access design characteristics. There is however a library function available which returns a comma separated list of the characteristics. The expression is: TLIBRARY(LIBDBSTYLE.TXT)
DBENTGET - function for accessing entity level information (User, Group, Company...) given its database ID
DATECONV - function for doing various date format conversions
DBGET
The main expression to get many of the primary database fields is DBGET. This function accepts 2 parameters and returns the database field as indicated below
DBGET(ENTITY,VARIABLE)
The first parameter is the sub-entity and can be one of the following values:
- DESIGN - for design level information
- OWNER - for design-owner level information
- CUST - for design-customer level information
- DSGNR - for design-designer level information
- SLSPN - for design-salesperson level information
Entity = DESIGN
For access to design level information.
e.g. DBGET(DESIGN,REV$) - returns the current revision letter
Variable | Returns |
---|---|
AUTHR$ | Database ID of current version author (see DBENTGET on how to access individual fields) |
DESC$ | Description |
DOCID$ | Database ID of the Document Object |
DVRID$ | Database ID of the Document Version Object |
FLDID$ | Database ID of the Folder Object |
LCKCM$ | Current checkin comment before committing new version |
LCKID$ | Database ID of the user who has this document locked (see DBENTGET on how to access individual fields) |
LGNID$ | Database ID of the current logged in user (see DBENTGET on how to access individual fields) |
LKDAT$ | Date the document was locked; returned as UTC (see DATECONV on how to convert date fields) |
NAME$ | Design Name |
PATH$ | Current pathname (unmanaged) or subfolder (managed) |
PRJID$ | Database ID of the Project Object |
PRJNM$ | Project name (managed) |
REV$ | Current revision letter |
REV | Current revision number (returned as text) |
RSDAT$ | Current version date; returned as UTC (see DATECONV on how to convert date fields) |
RVDAT$ | Revision date, of the form YYYY-MM-DD |
RVSUM$ | Current revision checkin comment |
SVDAT$ | Version saved date, of the form YYYY-MM-DD |
VER$ | Current version letter |
VER | Current version number (returned as text) |
VRSUM$ | Current version checkin comment |
VRDAT$ | Current version date; returned as UTC (see DATECONV on how to convert date fields) |
There are also some other non-text variables which can by directly accessed using the DBREC variable
Variable | Returns |
---|---|
DBREC.HGHVER | Highest version number |
DBREC.MANGED | 1 if document is managed, else 0 |
DBREC.SUBVER | 1 if current version is a draft, else 0 |
Entity = OWNER
For access to design-owner level information. For enterprise, the owner-location is calculated as follows. For an unmanaged document the owner is considered the location of the logged in user; else if the the document is locked, the owner is the locked user's location; else the owner is location of the current version author.
e.g. DBGET(OWNER,NAME$) - returns the design-owner company name
Variable | Returns |
---|---|
ADDR1$ | Location address 1 |
ADDR2$ | Location address 2 |
CITY$ | Location city |
CMPID$ | Database ID of company object (see DBENTGET on how to access individual fields) |
CMPLN$ | Company legal name |
CMPNM$ | Company name |
CNTRY$ | Location country |
FAX$ | Location fax number |
ID$ | Database ID of company object (see DBENTGET on how to access individual fields) |
LNAME$ | Company legal name |
LOC$ | Location name |
LOCID$ | Database ID of location object (see DBENTGET on how to access individual fields) |
NAME$ | Company name |
NUMBR$ | Location number |
PHONE$ | Location phone number |
STATE$ | Location state |
ZIP$ | Location zip code |
Entity = CUST
For access to design-customer level information. For an unmanaged document the customer is stored locally with the document; else the customer is read from the project.
e.g. DBGET(CUST,NAME$) - returns the design-customer company name
Variable | Returns |
---|---|
ADDR1$ | Location address 1 |
ADDR2$ | Location address 2 |
CITY$ | Location city |
CMPID$ | Database ID of company object (see DBENTGET on how to access individual fields) |
CMPLN$ | Company legal name |
CMPNM$ | Company name |
CNTRY$ | Location country |
FAX$ | Location fax number |
ID$ | Database ID of company object (see DBENTGET on how to access individual fields) |
LNAME$ | Company legal name |
LOC$ | Location name |
LOCID$ | Database ID of location object (see DBENTGET on how to access individual fields) |
NAME$ | Company name |
NUMBR$ | Company number |
PHONE$ | Location phone number |
STATE$ | Location state |
ZIP$ | Location zip code |
Entity = DSGNR
For access to design-designer level information. For enterprise the designer-user is calculated as follows. For an unmanaged document the designer is considered the logged in user; else if the document is locked, the owner is the locked user; else the owner is the current version author.
e.g. DBGET(CUST,LNAME$) - returns the design-designer last name
Variable | Returns |
---|---|
ADDR1$ | Location address 1 |
ADDR2$ | Location address 2 |
CELL$ | User cell phone number |
CITY$ | Location city |
CMPID$ | Database ID of company object (see DBENTGET on how to access individual fields) |
CMPLN$ | Company legal name |
CMPNM$ | Company name |
CNAME$ | Company name |
CNTRY$ | Location country |
EMAIL$ | User email address |
FAX$ | Location fax number |
FNAME$ | User first name |
FONE$ | User phone number |
ID$ | Database ID of user object (see DBENTGET on how to access individual fields) |
LNAME$ | User last name |
LOC$ | Location name |
LOCID$ | Database ID of location object (see DBENTGET on how to access individual fields) |
NAME$ | Company name |
NUMBR$ | Location number |
PHONE$ | Location phone number |
SNAME$ | User short name |
STATE$ | Location state |
ZIP$ | Location zip code |
Entity = SLSPN
For access to design-salesperson level information. For a managed document the salesperson-user is calculated from the project.
e.g. DBGET(SLSPN,FNAME$) - returns the design-salesperson first name
Variable | Returns |
---|---|
ADDR1$ | Location address 1 |
ADDR2$ | Location address 2 |
CELL$ | User cell phone number |
CITY$ | Location city |
CMPID$ | Database ID of company object (see DBENTGET on how to access individual fields) |
CMPLN$ | Company legal name |
CMPNM$ | Company name |
CNAME$ | Company name |
CNTRY$ | Location country |
EMAIL$ | User email address |
FAX$ | Location fax number |
FNAME$ | User first name |
FONE$ | User phone number |
ID$ | Database ID of user object (see DBENTGET on how to access individual fields) |
LNAME$ | User last name |
LOC$ | Location name |
LOCID$ | Database ID of location object (see DBENTGET on how to access individual fields) |
NAME$ | Company name |
NUMBR$ | Company number |
PHONE$ | Location phone number |
SNAME$ | User short name |
STATE$ | Location state |
ZIP$ | Location zip code |
DBGETATT
Use this expression to access attribute values for a document or project. This function accepts two parameters and returns the current value of the attribute specified.
DBGETATT(ATTNAMEORID,ARGTYPE)
The first parameter (ATTNAMEORID) is either the attribute database ID or the attribute name.
The second parameter (ARGTYPE) specifies how the first parameter is interpreted:
- 0 - ATTNAMEORID represents document attribute name
- 1 - ATTNAMEORID represents document attribute ID
- 2 - ATTNAMEORID represents project attribute name
- 3 - ATTNAMEORID represents project attribute ID
e.g. DBGETATT("00002_0000000009",1) - returns the current value of the document attribute with the ID=00002_0000000009
Note that this function will return the textual representation of the attribute (in current units) based on the Format specified for the attribute.
DBGETREV
Use this expression to get version/revision history information. This function accepts three parameters and returns the field as specified below:
DBGETREV(VARIABLE,REVOFFSET,VERORREV)
The last parameter (VERORREV) is optional and specifies whether this function should work in a revision mode (VERORREV=0 (default)) or in a version mode (VERORREV=1)
The second parameter (REVOFFSET) specifies which revision/version to access. There are two approaches here: accessing the revision/version as an offset from the current revision/version or accessing the revision/version based on its absolute position:
- REVOFFSET <= 0 - selects revision/version offset from the current revision/version
- REVOFFSET > 0 - selects absolute revision/version (1-based)
The first parameter (VARIABLE) defines the field to return:
VARIABLE | VERORREV | Returns |
---|---|---|
RVDAT$ | 0-Revision Mode | Revision create date, in the form YYYY-MM-DD |
RVDAT$ | 1-Version Mode | Version create date, in the form YYYY-MM-DD |
VRDAT$ | 0-Revision Mode | Revision create date, returned as UTC (see DATECONV on how to convert date fields) |
VRDAT$ | 1-Version Mode | Version create date, returned as UTC (see DATECONV on how to convert date fields) |
REV$ | 0-Revision Mode | Revision letter for the specified revision |
REV$ | 1-Version Mode | Version letter for the specified version |
REV | 0-Revision Mode | Revision number (as text) for the specified revision |
REV | 1-Version Mode | Version number (as text) for the specified version |
VER$ | 0-Revision Mode | Revision letter for the specified revision |
VER$ | 1-Version Mode | Version letter for the specified version |
VER | 0-Revision Mode | Revision number (as text) for the specified revision |
VER | 1-Version Mode | Version number (as text) for the specified version |
RVSUM$ | 0-Revision Mode | Checkin comment for the specified revision |
RVSUM$ | 1-Version Mode | Checkin comment for the specified version |
VRSUM$ | 0-Revision Mode | Checkin comment for the specified revision |
VRSUM$ | 1-Version Mode | Checkin comment for the specified version |
RSDAT$ | 0-Revision Mode | Revision create date, returned as UTC (see DATECONV on how to convert date fields) |
RSDAT$ | 1-Version Mode | Version create date, returned as UTC (see DATECONV on how to convert date fields) |
AUTHR$ | 0-Revision Mode | Database ID of then specified revision author (see DBENTGET on how to access individual fields) |
AUTHR$ | 1-Version Mode | Database ID of then specified version author (see DBENTGET on how to access individual fields) |
SVDAT$ | 0-Revision Mode | Revision saved date, in the form YYYY-MM-DD |
SVDAT$ | 1-Version Mode | Version saved date, in the form YYYY-MM-DD |
e.g. DBGETREV(SVDAT$,0) - returns the saved date for the current revision
e.g. DBGETREV(SVDAT$,2,1) - returns the saved date for revision 1
Note that the idea of the current version/revision is somewhat different in Enterprise ArtiosCAD versus the Standard edition. In Enterprise, the current version/revision is actually the last one submitted, thus these expression may not always produce the expected values if used as calculated expressions for attributes.
DBPROJ
The main expression to get many of the project level database fields is DBPROJ. This function accepts two parameters and returns the database field as indicated below
DBPROJ(ENTITY,VARIABLE)
The first parameter is the sub-entity and can be one of the following values:
- PROJECT - for project level information
- OWNER - for project-owner (project manager's company) information
- CUST - for project-customer level information
- DSGNR - for project-manager level information
- SLSPN - for project-salesperson level information
Entity = PROJECT
e.g. DBPROJ(PROJECT,NAME$) - returns the project name
Variable | Returns |
---|---|
CRDAT$ | Project creation date, returned as UTC (see DATECONV on how to convert date fields) |
DESC$ | Project description |
DUEDT$ | Project due date, returned as UTC (see DATECONV on how to convert date fields) |
MDDAT$ | Project modified date, returned as UTC (see DATECONV on how to convert date fields) |
NAME$ | Project name |
STAT$ | Project status |
STYLS$ | Project characteristics (comma separated list) |
Entity = OWNER
For enterprise the project owner is calculated as the project manager's company/location.
e.g. DBPROJ(OWNER,NAME$) - returns the project manager's company name
Variable | Returns |
---|---|
ADDR1$ | Location address 1 |
ADDR2$ | Location address 2 |
CITY$ | Location city |
CMPID$ | Database ID of company object (see DBENTGET on how to access individual fields) |
CMPLN$ | Company legal name |
CMPNM$ | Company name |
CNTRY$ | Location country |
FAX$ | Location fax number |
ID$ | Database ID of company object (see DBENTGET on how to access individual fields) |
LNAME$ | Company legal name |
LOC$ | Location name |
LOCID$ | Database ID of location object (see DBENTGET on how to access individual fields) |
NAME$ | Company name |
NUMBR$ | Location number |
PHONE$ | Location phone number |
STATE$ | Location state |
ZIP$ | Location zip code |
Entity = CUST
For access to project-customer level information
e.g. DBPROJ(CUST,NAME$) - returns the project-customer company name
Variable | Returns |
---|---|
ADDR1$ | Location address 1 |
ADDR2$ | Location address 2 |
CITY$ | Location city |
CMPID$ | Database ID of company object (see DBENTGET on how to access individual fields) |
CMPLN$ | Company legal name |
CMPNM$ | Company name |
CNTRY$ | Location country |
FAX$ | Location fax number |
ID$ | Database ID of company object (see DBENTGET on how to access individual fields) |
LNAME$ | Company legal name |
LOC$ | Location name |
LOCID$ | Database ID of location object (see DBENTGET on how to access individual fields) |
NAME$ | Company name |
NUMBR$ | Company number |
PHONE$ | Location phone number |
STATE$ | Location state |
ZIP$ | Location zip code |
Entity = DSGNR
For access to project manager level information. For Enterprise the project manager can be a User or a Group. The function DBPROJ(DSGNR,TYPE$) can be used to determine this. This expression return "U" for a User and "G" for a Group.
e.g. DBPROJ(DSGNR,LNAME$) - returns the project manager last name
Variables supported when Manager is a User | Returns |
---|---|
ADDR1$ | Location address 1 |
ADDR2$ | Location address 2 |
CELL$ | User cell phone number |
CITY$ | Location city |
CMPID$ | Database ID of company object (see DBENTGET on how to access individual fields) |
CMPLN$ | Company legal name |
CMPNM$ | Company name |
CNAME$ | Company name |
CNTRY$ | Location country |
EMAIL$ | User email address |
FAX$ | Location fax number |
FNAME$ | User first name |
FONE$ | User phone number |
ID$ | Database ID of user object (see DBENTGET on how to access individual fields) |
LNAME$ | User last name |
LOC$ | Location name |
LOCID$ | Database ID of location object (see DBENTGET on how to access individual fields) |
NAME$ | Company name |
NUMBR$ | Location number |
PHONE$ | Location phone number |
SNAME$ | User short name |
STATE$ | Location state |
TYPE$ | "U" |
ZIP$ | Location zip code |
Variables supported when Manager is a Group | Returns |
---|---|
FNAME$ | Group name |
ID$ | Database ID of group object (see DBENTGET on how to access individual fields) |
LNAME$ | Group name |
NAME$ | Group name |
SNAME$ | Group name |
TYPE$ | "G" |
Entity = SLSPN
For access to project-salesperson level information.
e.g. DBPROJ(SLSPN,FNAME$) - returns the project-salesperson first name
Variable | Returns |
---|---|
ADDR1$ | Location address 1 |
ADDR2$ | Location address 2 |
CELL$ | User cell phone number |
CITY$ | Location city |
CMPID$ | Database ID of company object (see DBENTGET on how to access individual fields) |
CMPLN$ | Company legal name |
CMPNM$ | Company name |
CNAME$ | Company name |
CNTRY$ | Location country |
EMAIL$ | User email address |
FAX$ | Location fax number |
FNAME$ | User first name |
FONE$ | User phone number |
ID$ | Database ID of user object (see DBENTGET on how to access individual fields) |
LNAME$ | User last name |
LOC$ | Location name |
LOCID$ | Database ID of location object (see DBENTGET on how to access individual fields) |
NAME$ | Company name |
NUMBR$ | Company number |
PHONE$ | Location phone number |
SNAME$ | User short name |
STATE$ | Location state |
ZIP$ | Location zip code |
DBENTGET
The main function for accessing entity level information (User, Group, Company...) is DBENTGET. This function accepts three parameters and returns the database field as indicated below
DBENTGET(ENTITY,ID,VARIABLE)
The first parameter is the sub-entity and can be one of the following values:
- USER - used to access User object fields
- GROUP - used to access Group object fields
- COMPANY - used to access Company object fields
- LOCATION - used to access Location object fields
- STYLE - used to access Characteristic object fields
The second parameter is the database ID of the object. Typically this is returned via a DBGET function (e.g. DBPROJ(SLSPN,ID$) )
The last parameter specifies the fields to return as indicated in the tables below.
Entity = USER
For access to user entity fields.
e.g. DBENTGET(USER,"0000_0003040",FNAME$) - returns the first name of the user identified by the database ID "0000_0003040".
Variable | Returns |
---|---|
ADDR1$ | Location address 1 |
ADDR2$ | Location address 2 |
CELL$ | User cell phone number |
CITY$ | Location city |
CMPID$ | Database ID of company object (see DBENTGET on how to access individual fields) |
CMPLN$ | Company legal name |
CMPNM$ | Company name |
CNAME$ | Company name |
CNTRY$ | Location country |
EMAIL$ | User email address |
FAX$ | Location fax number |
FNAME$ | User first name |
FONE$ | User phone number |
ID$ | Database ID of user object (see DBENTGET on how to access individual fields) |
LNAME$ | User last name |
LOC$ | Location name |
LOCID$ | Database ID of location object (see DBENTGET on how to access individual fields) |
NAME$ | Company name |
NUMBR$ | Location number |
PHONE$ | Location phone number |
SNAME$ | User short name |
STATE$ | Location state |
ZIP$ | Location zip code |
Entity = GROUP
For access to group entity fields.
e.g. DBENTGET(GROUP,"0000_0003040",NAME$) - returns the name of the group identified by the database ID "0000_0003040".
Variable | Returns |
---|---|
ID$ | Database ID of group object (see DBENTGET on how to access individual fields) |
NAME$ | Group name |
Entity = COMPANY
For access to company entity fields.
e.g. DBENTGET(COMPANY,"0000_0003040",NAME$) - returns the name of the company identified by the database ID "0000_0003040".
Variable | Returns |
---|---|
ID$ | Database ID of company object (see DBENTGET on how to access individual fields) |
LNAME$ | Company legal name |
NAME$ | Company name |
Entity = LOCATION
For access to location entity fields.
e.g. DBENTGET(LOCATION,"0000_0003040",NAME$) - returns the name of the location identified by the database ID "0000_0003040".
Variable | Returns |
---|---|
ADDR1$ | Location address 1 |
ADDR2$ | Location address 2 |
CITY$ | Location city |
CMPID$ | Database ID of company object (see DBENTGET on how to access individual fields) |
CMPLN$ | Company legal name |
CMPNM$ | Company name |
CNTRY$ | Location country |
FAX$ | Location fax number |
ID$ | Database ID of location object (see DBENTGET on how to access individual fields) |
NAME$ | Location name |
NUMBR$ | Location number |
PHONE$ | Location phone number |
STATE$ | Location state |
ZIP$ | Location zip code |
Entity = STYLE
For access to characteristic entity fields.
e.g. DBENTGET(STYLE,"0000_0003040",NAME$) - returns the name of the characteristic identified by the database ID "0000_0003040".
Variable | Returns |
---|---|
ID$ | Database ID of characteristic object (see DBENTGET on how to access individual fields) |
NAME$ | Characteristic name |
PATH$ | Characteristic path |
DATECONV
The DATECONV function converts various date expressions. This function accepts three parameters and returns the date as text in the requested format.
DATECONV(DATEEXP,OLDFRMT,NEWFRMT)
The first parameter DATEEXP is the existing date expression. Typically this is returned using an existing DBGET function (e.g. DBGET(DESIGN,LKDAT$) returns the date the design was locked).
The second parameter OLDFRMT specifies how the DATEEXP parameter should be interpreted. The possible values are:
- 1 - indicates that DATEEXP is in the format mm/dd/yyyy
- 2 - indicates that DATEEXP is in the format yyyy-mm-dd
- 3 - indicates that DATEEXP is in the UTC format (number of seconds since midnight January 1, 1970)
The last parameter indicates how that input DATEEXP should be converted and returned. The possible values are:
- 1 - convert to and return short localized date format; e.g. 12/25/2013
- 2 - convert to and return long localized date format; e.g. Wednesday, December 25, 2013
- 3 - convert to and return short localized date/time format; e.g. 12/25/2013 12:00:00 AM
- 4 - convert to and return long localized date/time format; e.g. Wednesday, December 25, 2013 12:00:00 AM
Article information | |
---|---|
Applies to | ArtiosCAD all versions |
Created | 02-Dec-13 |
Last revised | |
Author | MRAN |
CW Number |