VersIC user skill API
Overview
The Perforce SKILL API enables integration of our Cadence client VersIC into your custom design flows. You can call the VersIC SKILL API functions directly from your SKILL procedures, allowing you to seamlessly perform DM operations without requiring the use of the VersIC GUI.
Functionality supported in the VersIC SKILL API includes:
-
Add/Delete
-
Checkin/Checkout/Revert
-
Copy
-
Status query functions
-
Hierarchical operations
Note to users If you require some capability that is not yet available in the API, Perforce are able to leverage the modular architecture of VersIC to quickly add features to the already comprehensive API.
VersIC also has hooks for user-defined triggers, so you can run your own SKILL procedures when certain events occur in VersIC. See User defined triggers for more information.
Note: VersIC has an evolving user Skill API for programmatical DM operations. Keep us apprised of your programming needs, if we can accommodate your requirements we will.
Functions
| Function Name | Description | Arguments | Returns |
Examples |
|
|---|---|---|---|---|---|
| 1 | vscUserIsManaged | Is the object managed? | d_obj - ddObj|db_cvId|directory|file |
Returns: |
1) Is the cellview (opamp,opamp,schematic) managed by VersIC? 2) Is a file managed? vscUserIsManaged("~/myProject/myWorkarea/opamp/aFile.txt") |
| 2 |
vscUserIsVscObj vscUserIsVscFile |
Deprecated (see vscUserIsManaged) |
|
|
|
| 3 | vscUserGetLibs | Get the list of VersIC managed libraries | ?b_refresh - refresh the list of managed libraries |
Returns: |
1) Update and return the list of managed libraries |
| 4 | vscUserAdd | Add database object(s) to VersIC |
d_obj/l_objs - ddObj/list of ddObjs |
t - object(s) were added to VersIC |
1) Add the cellview (opamp,opamp,schematic) 2) Add cells opamp and twoStage |
| 5 | vscUserAddLib | Add database object(s) to VersIC |
t_lib - Library name |
t - Library was added to VersIC |
1) Add the library "myLib" at the top level of the workarea |
| 6 | vscUserUpdate | Update/Sync a managed object | d_obj - ddObj |
t - object was updated |
1) Update the library opamp 2) Update a cellview |
| 7 | vscUserCheckout | Checkout objects in VersIC | d_obj/l_objs - ddObj/list of ddObjs |
t - all object(s) were checked out (or were already checked out) |
1) Checkout a cellview 2) Checkout a cell 3) Checkout the cell level properties file 4) Checkout a list of cells |
| 8 | vscUserCheckin | Checkin (commit) objects in VersIC |
l_objs - ddObjs|files|directories (single obj also supported) |
t - all objects were checked in |
1) Checkin cellview (opamp, opamp, schematic) 2) Checkin everything in library 'opamp', use the given log message 3) Checkin the cell level properties file 4) Checkin a list of cells |
| 9 | vscUserCancel | Revert (cancel) checked out objects in VersIC | l_objs - ddObjs|files|directories (single obj also supported) |
t - all objects were cancelled/reverted |
1) Cancel checkout of cellview (opamp,opamp,schematic) |
| 10 | vscUserDelete | Delete objects in VersIC |
l_objs - list of ddObjs|files|directories (or single obj) |
t - all objects were deleted nil - one or more objects were not deleted |
1) Delete cellview (opamp,opamp,schematic) vscUserDelete(ddGetObj("opamp" "opamp" "schematic"))
|
| 11 | vscUserIsCheckedOutByMe | Is file (or any file in a directory) locked by current user? | d_obj - ddObj|directory|file|db_cvId |
t - object is checked out by current user, in current workspace |
1) Is (opamp,opamp,schematic) checked out by me? |
| 12 | vscUserIsCheckedOutByOther | Is file (or a file in directory) locked by another user? | d_obj - ddObj|directory|file|db_cvId |
l_owners - list of checkout owners if object is checked out by others |
1) Is (opamp,opamp,schematic) checked out by other user(s)? |
| 13 | vscUserPurgeCVs | Purge (close) open cellviews belonging to ddObjs ( or all ) | [d_ddObjs] - optional list of dd objects |
list - length of list is number of open cellviews that were purged Caution: Will discard unsaved changes |
1) Purge all open cellviews in library 'opamp' |
| 14 | vscUserIsObjStatus | Is obj checked out by anyone? | d_obj - ddObj |
t - object is checked out |
1) Check if anyone has data checked out in library opamp |
| 15 | vscUserFileInfo | Get informaton about a managed object/file/directory |
obj - ddObj/file (When using P4 only 'last_change' and 'have' are available) [b_refresh] - refresh cached info |
Without type: disembodied property list (DPL): With type: value of requested info type or nil |
1) Get the author of the last checkin of a cellview master file 2) Get all available information about a cellview master file |
| 16 | vscUserFilesInfo | Get informaton about managed objects/files/directories |
objs - list of ddObjs/files (When using P4 only 'last_change' and 'have' are available) [b_refresh] - refresh cached info |
Without type: list of disembodied property lists (DPL): - see vscUserFileInfo With type: list of values of requested info type or nil |
|
| 17 | vscUserGetVersion | Get the VersIC version identifier | None | t_version - e.g. "1.6.55" | |
| 18 | vscUserCheckAccess (valid only if VSC_ACCESS_FILE is used) |
Check if the user has permission for an action on given dir(s) |
t_action - One of the actions from template access control file |
t - user is permitted to perform the action With the optional accessfile and user arguments, use this procedure to
|
1) Does the current user have permission to checkout data in opamp? 2) Does the user 'wayne' have permission to delete data in opamp using the given access file? |
| 19 | vscUserGetHierarchy | Get the cellviews [and files] (ddObjs) in a hierarchy |
t_lib - top-level library name |
A disembodied property list: list(nil |
|
| 20 | vscUserCheckoutHierarchy | Checkout a cell/cellview hierarchy |
t_lib - top-level library name |
t - all cellviews in hierarchy scope are checked out by current user |
1) Checkout all cellviews in the (opamp, opamp) hierarchy, in any library 2) Checkout all layout views in the (opamp, opamp) hierarchy that are in the opamp library |
| 21 | vscUserCheckinHierarchy | Checkin a cell/cellview hierarchy |
t_lib - top-level library name |
t_revision - revision or change number of successful checkin nil - checkin failed on one or more cellviews in hierarchy |
1) Checkin all cellviews in the (opamp, opamp) hierarchy, in any library 2) Checkin all layout views in the (opamp, opamp) hierarchy that are in the opamp library |
| 22 | vscUserCancelHierarchy | Cancel checkout/revert a cell/cellview hierarchy |
t_lib - top-level library name |
t - All checked out cellviews in hierarchy were cancelled/reverted |
1) Cancel checkout of all cellviews in the (opamp, opamp) hierarchy, in any library 2) Cancel checkout of all layout views in the (opamp, opamp) hierarchy that are in the opamp library |
| 23 | vscUserCopy | Copy a cell or a cellview or a hierarchy |
l_from - source data list (t_lib, t_cell, [l_views]) ?t_message - log message |
t - Copy was successful |
1) Copy (opamp,opamp,layout) to (opamp,opamp,layout_new), with history |
| 24 | vscUserRetrieve | Retrieve a previous version of data to new cell/cellviews |
?t_lib - library name "lib" - Retrieve data to 'lib_<suffix>' |
t - Retrieve was successful |
1) Retrieve rev 1000 of all cellviews in opamp,opamp to '<viewname>_r1000' |
| 25 | vscUserUpdateAllLibs | Update all local managed libraries | None |
t - libraries were updated nil - no local managed libraries |
vscUserUpdateAllLibs() |
| 26 | vscUserCompareCellviews |
Compare two cellviews, optionally report results in a file |
db_cvIdA - reference cellview (db_cvId) |
l_diff - a disembodied property list of differences list(nil
nil - no differences |
cvId_A = dbOpenCellview(<lib> <cell> <view>) |
| 27 | vscUserIsObjCurrent | Is object in workarea the latest version? | d_obj - ddObj |
t - object in the workarea is the latest version nil - a newer version of the object exists in the repository or the object does not exist or is unmanaged |
1) Is all the data in the library opamp the latest version? vscUserIsObjCurrent(ddGetObj("opamp")) |