Upload
dan-oprita
View
872
Download
31
Embed Size (px)
Citation preview
8/17/2019 ENOVIA VPM Training
1/190
Appendixes
Exercises
Foils
Version 1 Release 3June 2000FOR-E-APVPP-03-AL
ENOVIAVPM Training
Solutions
VPM Programming
8/17/2019 ENOVIA VPM Training
2/190
VPM Programming
Copyright DASSAULT SYSTEMES 2000 i-2 Menu
Copyright DASSAULT SYSTEMES 2000
ALL RIGHTS RESERVED
No part of this publication may be marked, reproduced, translated, stored in aretrieval system or transmitted, in any form or by any means, including electronic,mechanical, photocopying, recording or otherwise, without the express prior writtenpermission of DASSAULT SYSTEMES.
Specifically, this training material is provided for your internal training requirementsonly and shall not be used to train any third party in the use and operation of oursoftware.
DO NOT
COPY
8/17/2019 ENOVIA VPM Training
3/190
Copyright DASSAULT SYSTEMES 2000 i-3 Menu
VPM Programming
Table of Contents
Appendix 1 - DB2 Main Instructions .................................................................... 9 Appendix 2 - Oracle Main Instructions ............................................................... 11 Appendix 3 - DB table structure .......................................................................... 13 Appendix 4 - Environment Table Administration ............................................... 63 Appendix 5 - C++ Reminder ............................................................................... 67 Appendix 6 - Headers .......................................................................................... 71
CATDMUsrMethod.h ................................................................................. 71CATVpmAFUsrMethod.h .......................................................................... 87CATVpmPEUsrMethod.h ........................................................................... 92CATVpmSCUsrManager.h ......................................................................... 94CATVpmPEUsrManager ............................................................................ 97CATVpmSCUsrLogin.h ............................................................................. 99
CATCfgInterfaces.h .................................................................................. 101CATVPMFilter.h ...................................................................................... 125CATVPMFilterManager.h ........................................................................ 126CATVPMNode.h ...................................................................................... 128CATLnkAPI.h ........................................................................................... 129CATVpmPubSubUsrAdmin.h .................................................................. 134CATVpmPubSubUsrManager.h ............................................................... 138CATDMUsrInstance.h .............................................................................. 143CATDMUsrMethodContext.h .................................................................. 150CATDMUSRSelect.h ................................................................................ 152CATDMUSRUpsate.h .............................................................................. 154CATDMUSRCatia.h ................................................................................. 156CATDMUSRResultPanel.h ...................................................................... 157CATcdm.h ................................................................................................. 158CATUnicodeString.h ................................................................................ 160
Appendix 7 - APIs and VPM version ................................................................ 177
8/17/2019 ENOVIA VPM Training
4/190
Copyright DASSAULT SYSTEMES 2000 i-4 Menu
VPM Programming
8/17/2019 ENOVIA VPM Training
5/190
VPM Programming
Copyright DASSAULT SYSTEMES 2000 i-5 Menu
Preface
Course objectivesAt the end of the VPM Programming course, participants will be capable of managing VPMpossibilities for customization:
Consequently, the user will be able to:Understand the data structure in the data baseImplement the User Exit provided to customize the functionalities of:
the BOM productthe AFL productthe P&O productthe CFG productthe STEP product
Create Data Base triggersCreate new tools or methods to the PSN or VPMA, using the API for Configuration,Database Access, P&O, MML management or Publish/Subscribe.
PrerequisitesTo take full advantage of this instruction, participants are expected to be familiar with UNIXcommands and text editors, C++ programmation, VPM user functionalities and VPMAdministration course.
Training materials deliveredEach participant will receive four documents:
The ‘Foils’ document used by the trainer during the lectureThe ‘Appendix’ document in order to get additional information on specific domainsThe ‘Exercises’ document used for hands-onThe ‘Solutions’ document that contains the solution for the exercises.
CATIA-related publicationsVPM Administration User’s GuideReference documentation
Moreover, VPM online documentation can be accessed by selecting the item Main, Contents orIndex in the Help menu in VPMA.
8/17/2019 ENOVIA VPM Training
6/190
VPM Programming
Copyright DASSAULT SYSTEMES 2000 i-6 Menu
Course scheduleVPM Programmation training is a 4-day course. Each half-day comprises :
a theoretical talk with foilsexercises allowing the participants to apply the concepts covered in the lesson.
Morning Afternoon
Day 1 • Chapter 1: IntroductionExercise 1: CDM prole customization• Chapter 2: User Exit Miscellaneous• Chapter 3: User Exit - Action FlowExercise 2: AFL Customization
• Chapter 4: User Exit - BOMExercise 3: Browsing Data Structure• Chapter 4: User Exit - BOMExercise 4: BOM Object CreationCustomization
Day 2 • Chapter 4: User Exit - BOMExercise 5: Data Base Access• Chapter 5: Version - RevisionExercise 6: Version - RevisionCustomization
• Chapter 6: User Exit - NewFunctionality Creation
Exercise 7: Interface Customization
Day 3 • Chapter 7: API for Managing MMLLinks
Exercise 8: MML API• Chapter 8: Conguration APIExercise 9: Conguration API
• Chapter 9: FilterExercise 10: Filter• Chapter 10: P&O APIExercise 11: P&O API
Day 4 • Chapter 11: Publish and Subscribe
APIExercise 12: Publish/Subscribe API• Chapter 12: User Exit - DMUSLFExercise 13: DMUSLF
• Chapter 13: User Exit - STEP
Exercise 14: STEP Customization• Chapter 14: TriggersExercise 15: SQL Triggers
8/17/2019 ENOVIA VPM Training
7/190
VPM Programming
Copyright DASSAULT SYSTEMES 2000 i-7 Menu
Reader’s Comments
We would very much appreciate your comments on this guide. Please specify the pages andlines to which they apply. All comments (concerning the general presentation, terminology,step-by-step procedures, examples, methodology and / or your overall evaluation, etc.) will becarefully examined by the authors of this documentation.
Please send your comments including your name and address to:
DASSAULT SYSTEMESTraining DepartmentCSM / STT9, quai Marcel Dassault92156 SURESNES Cedex (FRANCE)
Fax: (33-1) 40.99.43.76
8/17/2019 ENOVIA VPM Training
8/190
VPM Programming
Copyright DASSAULT SYSTEMES 2000 i-8 Menu
8/17/2019 ENOVIA VPM Training
9/190
Copyright DASSAULT SYSTEMES 2000 1-9 Menu
VPM Programming
Appendix 1 - DB2 Main Instructions
Listing ObjectsLog into DB2 db2
List database(s) list db directory
Enter into a database connect to DataBaseName
Tables in the database select * from sysibm.systableslist tables for all
Tables belonging to owner VPMENV list tables for schema VPMENV
Table structure select * from owner.tabledescribe table owner.table
Objects in the table select ‘attribute list’ from owner.table where ‘Query’
Creating ObjectsDatabase creation create db DBName on TableSpacePath
Table creationcreate table owner.table ( AttributeName AttributeType NOT NULL )
View creationcreate view owner.view as select AttibuteList from owner.table where ‘Query’
Index creationcreate unique index owner.index on owner.table (AttributeList)
Creation of a new columnalter table owner.table add AttributeName attribute_type
Insertion of a new row in a table
insert into owner.table ( AttributeList ) values ( ValueList )
8/17/2019 ENOVIA VPM Training
10/190
Copyright DASSAULT SYSTEMES 2000 1-10 Menu
VPM Programming
Updating ObjectsUpdate an object update owner.table set AttributeName = Value where ‘ Query ’
Note : The Statement without query is applied for all the objects in the table.
Deleting ObjectsDeleting a db drop db DataBaseName
Deleting a table drop table owner.table
Deleting a view drop view owner.table
Deleting an index drop index owner.index
Deleting a row in a table delete from owner.table where ‘ Query ’
8/17/2019 ENOVIA VPM Training
11/190
Copyright DASSAULT SYSTEMES 2000 1-11 Menu
VPM Programming
Appendix 2 - Oracle Main Instructions
Listing ObjectsLog into Oracle sqlplus user/pwd (system/manager)
Tables in the database select table_name from all_tables;
Tables belonging to owner VPMENVselect table_name from all_tables where owner=’VPMENV’;
List of users created: select username from all_users;
Table structure desc owner.table ;
Objects in the tableselect ‘ attribute list ’ from owner.table where ‘ Query ’;
Note : Each attribute containing $ must be between double-quote.
Creating ObjectsTable creation
create table owner.table ( AttributeName AttributeType NOT NULL );
View creationcreate view owner.view as select AttibuteList from owner.table where ‘Query’ ;
Index creationcreate unique index owner.index on owner.table ( AttributeList );
Creation of a new columnalter table owner.table add AttributeName attribute_type ;
Insertion of a new row in a tableinsert into owner.table ( AttributeList ) values ( ValueList );
Updating ObjectsUpdate an object update owner .table set AtttibuteName = value where ‘Query’ ;
Note : The Statement without query is applied for all the objects in the table.
8/17/2019 ENOVIA VPM Training
12/190
Copyright DASSAULT SYSTEMES 2000 1-12 Menu
VPM Programming
Deleting ObjectsDeleting a table drop table owner.table ;
Deleting a view drop view owner.table ;
Deleting an index drop index owner.index ;
Deleting a row in a table delete from owner.table where ‘ Query ’;
8/17/2019 ENOVIA VPM Training
13/190
8/17/2019 ENOVIA VPM Training
14/190
Copyright DASSAULT SYSTEMES 2000 1-14 Menu
VPM Programming
The main tables for the following modules are:
BOM (owner: Environment)
PART_LIST
CATIA_MODEL
DOCUMENT
$EXT
$EXT_LF
LF00001
$LOCK
BOUNDING_BOX
CLASH
PART_PTR
ZONE
Architecture
CDM.$COROUTINES
CDM.MACRO_LIST
PROFILE.PROFILE_USER
CATIA.CONAME
CATIA.PROJECT
CATIA.PRODUCTPublish-Subscribe (owner: Administrator)
EVENTS
EXP_SUBSCRIBE
PUBLISHED_EVENTS
People & Organisation (owner: Administrator)
organization_
person_
role_
8/17/2019 ENOVIA VPM Training
15/190
8/17/2019 ENOVIA VPM Training
16/190
Copyright DASSAULT SYSTEMES 2000 1-16 Menu
VPM Programming
PART_LIST (Attributes describing the part)Column name Type name Explanation
----------------------------------------------------------------------------------------------------------------
$COID CHARACTER** Identifier of a part ( Complex object id )
$COMPID CHARACTER** 00000000 for a partS_......... ..............; Specific company attributes for the
signature of a part
STATUS CHARACTER** Other company attributes for description
PART_DESCRIPTION CHARACTER** Other company attributes for description
C_PART_VERSION CHARACTER** Version mechanism attribute
C_MATURITY CHARACTER** Maturity management attribute
D_TOOL CHARACTER* not used
D_PARM CHARACTER* not used
C_RESPONSIBLE CHARACTER* Owner of the partC_ORG_RESPONSIBLE CHARACTER* Organization to which the part belongs
C_CREATE TIMESTAMP Creation date of the part
C_CREATE_USER CHARACTER* User used to create the part
C_LASTMOD TIMESTAMP Last modification date
C_LASTMOD_USER CHARACTER* User used to modify the part
C_VERSION INTEGER Number of times that the part has
been overwritten
8/17/2019 ENOVIA VPM Training
17/190
Copyright DASSAULT SYSTEMES 2000 1-17 Menu
VPM Programming
CATIA_MODEL (Attributes describing the model)Column name Type name Explanation
----------------------------------------------------------------------------------------------------------------
$COID CHARACTER* Complex object identifier equal to the part $COID
$COMPID CHARACTER* Component identifier of the modelS_......... ................. Specific company attributes for signature of a model
MODEL_DESCRIPTION CHARACTER* Other company attributes for description
STATUS CHARACTER* Other company attributes for description
C_REVISION CHARACTER* Revision mechanism attribute
C_MATURITY CHARACTER* Maturity management attribute
D_TOOL CHARACTER* not used
D_PARM CHARACTER* not used
C_RESPONSIBLE CHARACTER* Owner of the model
C_ORG_RESPONSIBLE CHARACTER* Organization to which the model belongsC_CREATE TIMESTAMP Creation date of the model
C_CREATE_USER CHARACTER* User used to create the model
C_LASTMOD TIMESTAMP Last modification date
C_LASTMOD_USER CHARACTER* User used to modify the model
C_VERSION INTEGER Number of times that the model has been overwritten
C_COMPID_DATA CHARACTER* $COMPID value of $EXT_LF table for the model
C_INTFORM SMALLINT equal to 1
C_COMPNAME_DATA VARCHAR Table name containing the link to the repository(always EXT_LF)
C_SOFT_VER VARCHAR Version of CDM, which last modified the table (416)
C_NICKNAME VARCHAR equal to the model name, will be displayed on CATIA
C_XMIN , C_XMAX ..... DOUBLE Volume of the model is defined as engineering model
C_SIZE DOUBLE storage of the model size
C_LAST_REPOSITORY VARCHAR Repository where the model is stored
8/17/2019 ENOVIA VPM Training
18/190
8/17/2019 ENOVIA VPM Training
19/190
Copyright DASSAULT SYSTEMES 2000 1-19 Menu
VPM Programming
CATIA_PLOTColumn name Type name Explanation
----------------------------------------------------------------------------------------------------------------
$COID CHARACTER Complex object identifier equal to the part $COID
$COMPID CHARACTER Component identifier of the modelS_......... Specific company attributes for signature of a plot
D_TOOL CHARACTER
D_PARM CHARACTER
C_REVISION CHARACTER Revision mechanism attribute
C_MATURITY CHARACTER Maturity management attribute
C_NICKNAME VARCHAR Equal to the plot name, will be displayed on CATIA
C_LAST_REPOSITORY VARCHAR Repository where the plot is stored
C_X DOUBLE
C_Y DOUBLEC_ANGLE SMALLINT
C_UNIT DOUBLE
C_RESPONSIBLE CHARACTER Owner of the plot
C_ORG_RESPONSIBLE CHARACTER Organisation to which the plot belongs
C_CREATE TIMESTAMP Creation date of the plot
C_CREATE_USER CHARACTER User used to create the plot
C_LASTMOD TIMESTAMP Last modification date
C_LASTMOD_USER CHARACTER User used to modify the plot
C_VERSION INTEGER Number of times that the plot has been overwritten
C_COMPID_DATA CHARACTER $COMPID value of $EXT_LF table for the plot
C_COMPNAME_DATA VARCHAR Table name containing the link to the repository(always EXT_LF)
C_SOFT_VER VARCHAR Version of CDM which last modified the table
C_INTFORM SMALLINT Referenced for futur use
8/17/2019 ENOVIA VPM Training
20/190
Copyright DASSAULT SYSTEMES 2000 1-20 Menu
VPM Programming
$EXT (Table managing the links between objects)Column name Type name Explanation
----------------------------------------------------------------------------------------------------------------
$COID CHARACTER* Complex object identifier equal to the part $COID
$COMPID CHARACTER* Component identifier of the object$SITE CHARACTER* database Id if parent and child are in different DB
$CONAME VARCHAR PART_LIST table name for the child
$COMPNAME VARCHAR Representation table name for the child
$COID_REF CHARACTER* $COID of the child
$COMPID_REF CHARACTER* $COMPID of the child
$COMPID_FATHER CHARACTER* $COMPID of the father
$COMPNAME_FATHER VARCHAR Representation table name for the father
$TYPE CHARACTER* Relation type between parent and child
C_RESPONSIBLE CHARACTER* Owner of the link C_ORG_RESPONSIBLE CHARACTER* Organization responsible for this link
C_VERSION INTEGER Number of times the link has been overwritten
DISCI_COID CHARACTER* $COID of a discipline (CDM used only)
DISCI_COMPID CHARACTER* $COMPID of a discipline (CDM used only)
C_LASTMOD TIMESTAMP Last modification date
C_MML_TS TIMESTAMP Timestamp of the last MML synchronization
CATMML_STATUS CHARACTER* Status on the MML links : UPD, ...
EXPORT_ID CHARACTER* ‘Name’ field on the link
$USER1 VARCHAR Positioning matrix for assembly link and
NEW_MATRIX false
XMIN, XMAX...... DOUBLE Volume constituted of the set of child volumes
C_MAT01, C_MAT02........ DOUBLE Positioning matrix for assembly link andNEW_MATRIX true
8/17/2019 ENOVIA VPM Training
21/190
Copyright DASSAULT SYSTEMES 2000 1-21 Menu
VPM Programming
$EXT_LF (Table managing the links between an object and its repository)Column name Type name Explanation
----------------------------------------------------------------------------------------------------------------
$COID CHARACTER* Complex object identifier equal to the part $COID
$COMPID CHARACTER* Component identifier of the object$TYPE CHARACTER* Reserved for futur used
$COMPID_FATHER CHARACTER* $COMPID of the object (model or document)
$CUR_ACC_MET CHARACTER* Access Method used
$CUR_ACC_MET_DATA VARCHAR Directory or table in which the repository is stored
REPRES_TYPE VARCHAR Type of representation
Note:
$CUR_ACC_MET :
- DBLFCDM : repository stored inside the database using BLOB format
- DBLFAIX : repository stored in unix directory using BLOB format- DBLFCAT : repository store in unix directory using CATIA model format
$CUR_ACC_MET_DATA is equal to :
Repository table name followed by the $coid$compid of the object within the repository table for DBLFCDM accessmethod. For instance :VPMENV.LF00001 $COID$COMPID
Repository information defined in the REPOSITORY field of the insert panel for DBLFAIX access method. Forinstance : BIN PATH /tmp/xxxxxx
Repository directory in case of DBLFCAT
LF00001 (table to manage longfields within the database)Column name Type name Explanation
----------------------------------------------------------------------------------------------------------------
$COID CHARACTER* Complex object identifier equal to the part $COID
$COMPID CHARACTER* Component identifier of the object
$RECNO INTEGER Record number
$SEQNO INTEGER Sequence number
$DATA LONG VARCHAR Repository BLOB
8/17/2019 ENOVIA VPM Training
22/190
Copyright DASSAULT SYSTEMES 2000 1-22 Menu
VPM Programming
$LOCK (table to manage locks on objects)Column name Type name Explanation
----------------------------------------------------------------------------------------------------------------
$COID CHARACTER* Complex object identifier equal to the part $COID
$COMPID CHARACTER* Component identifier of the object$LOCKTYPE CHARACTER* Type of locks put on the object
$COMPREF CHARACTER* $COMPID of the object to be locked
C_COMPNAME VARCHAR Representation table name of the locked object
C_RESPONSIBLE CHARACTER* Owner of the lock
C_ORG_RESPONSIBLE CHARACTER* Organization of the owner of the lock
C_CREATE TIMESTAMP Timestamp of creation of the lock
DURATION VARCHAR Duration, after which the lock should be removed
COMMENTS VARCHAR Comments on the lock
BOUNDING_BOX (table used to manage volumes and spacemap)Column name Type name Explanation
----------------------------------------------------------------------------------------------------------------
$COID CHARACTER* Complex object identifier equal to the part $COID
$COMPID CHARACTER* Component identifier of the object equals to:
CSB^ENC^ : for a volume$COMPID of the model for a spacemap
REF_XMIN, REF_XMAX.... DOUBLE Part volume within an assembly
ASS_XMIN, ASS_XMAX..... DOUBLE Sub-assembly volume
TYPE CHARACTER* P : for part / M : for model / ̂ : no spacemap
VALID CHARACTER* V or ^
$DATA LONG VARCHAR Spacemap meshing data
Note : ^ stands for space CHARACTER*
8/17/2019 ENOVIA VPM Training
23/190
Copyright DASSAULT SYSTEMES 2000 1-23 Menu
VPM Programming
CLASH (table used to manage the clashes storage)Column name Type name Explanation
----------------------------------------------------------------------------------------------------------------
$COID CHARACTER* Complex object identifier equal to the part $COID
$COMPID CHARACTER* Component identifier of the objectS_TYPEOFCALC INTEGER Type of computation, 3 availaible values:
clash,clash+contact, clash+contact+clearance
S_CLEARANCEVALUE DOUBLE clearance values used for the computation
TYPEOFRESULT INTEGER type of result (clash / clearance)
MINIMALDISTANCE DOUBLE Minimal distance taken into account
INSTANCE_1_COMPID CHARACTER* COMPID of clashed instances in the
INSTANCE_2_COMPID CHARACTER* PART_PTR table
STATUS INTEGER current status of the clashes
COMMENTITF CHARACTER* commentsC_RESPONSIBLE CHARACTER* Owner of the clash
C_ORG_RESPONSIBLE CHARACTER* Organisation of the owner
C_LASTMOD TIMESTAMP clash written date
PART_PTR (Instances table)Column name Type name Explanation
----------------------------------------------------------------------------------------------------------------
$COID CHARACTER* COID of the root part$COMPID CHARACTER* COMPID of the instance
NAME VARCHAR instance name
NB_LINK INTEGER number of links to reach the instance from the root
OID CHARACTER* path between the root and the instance
C_COID_PART CHARACTER* $COID of the pointed part
C_ENV_PART CHARACTER* Environment of the pointed part
C_RESPONSIBLE CHARACTER* Owner of the instance
C_ORG_RESPONSIBLE CHARACTER* Organisation of the owner
C_USED_CLASH CHARACTER* Clash used by the pointed partC_USED_ASSY CHARACTER*
C_MAT01, C_MAT02, ... DOUBLE Positioning matrix for the instance
8/17/2019 ENOVIA VPM Training
24/190
Copyright DASSAULT SYSTEMES 2000 1-24 Menu
VPM Programming
ZONE (table used to manage predefined volume attached to a product)Column name Type name Explanation
----------------------------------------------------------------------------------------------------------------
$COID CHARACTER* Complex object identifier equal to the part $COID
$COMPID CHARACTER* Component identifier of the objectS_ZONE_NAME CHARACTER* Name of the zone
XMIN, XMAX.......... DOUBLE Volume defined for a zone
CDM.$COROUTINES (table in which all BOM objects must be declared)Column name Type name Explanation
----------------------------------------------------------------------------------------------------------------
$COID CHARACTER* Complex object identifier (equals to the
environment name of the object to be declared)
$COMPID CHARACTER* Component identifier
$CREATOR CHARACTER* Object owner, equals to the environment name
$OBJ VARCHAR Table or view to be declared or on which thetrigger will be launched
$COR_NAME VARCHAR see the following note
$PARM VARCHAR see the following note
$COND CHARACTER* Trigger condition ( Insert, Delete, Update, Select)
‘$’ for table declaration
$PRIORITY SMALLINT Priority
$WHEN CHARACTER* When Trigger must be launched ( After,Before)
$PGMNAME CHARACTER* Name of the trigger program (source file, not module)
$ATTRIBUTES VARCHAR Name of attributes on which modification launchs trigger
$EDBS_FLAG CHARACTER* = Y ( Trigger component ) / N otherwise
Note: $COR_NAME
- To declare a PART_LIST:ROOT : required when creating a new complex object ( PART_LIST )
CO_COMPONENT: an object is declared as component of a complex object
VCO_ALL_COMPONENT: This specific view must be defined for each new object
- To declare an object within the complex object (CATIA_MODEL, DOCUMENT):
CO_COMPONENT: an object is declared as component of a complex objectVCO_ALL_COMPONENT: This specific view must be defined for each new object
- For another view on an object, this declaration must be added:VCO_COMPONENT: Used to declare a view on an object
- For $EXT_LF table:LF_RELATION: define the relation object within the complex object
8/17/2019 ENOVIA VPM Training
25/190
Copyright DASSAULT SYSTEMES 2000 1-25 Menu
VPM Programming
- For a trigger: Comment
Note: $PARM- ENVNAME.PART_LIST for CO_COMPONENT
- ENVNAME.$OBJ for VCO_ALL_COMPONENT
- ENVNAME.TABLE_NAME for VCO_COMPONENT ( in this case OBJ is different from the table name)- ENVNAME.$EXT_LF for LF_RELATION
- * for ROOT
- Parameters for trigger
CDM.MACRO_LIST (table in which all the BOM profiles (aka CDMA profile) arestored)
Column name Type name Explanation
----------------------------------------------------------------------------------------------------------------
$COID CHARACTER* Identifier of the profile
$COMPID CHARACTER* ‘00000000’ for a profile
MACRO_NAME VARCHAR Profile name
SEQNO SMALLINT Sequence number of the line of text
MACRO_TEXT VARCHAR Profile text
PROFILE.PROFILE_USER (table used when declaring a profile in P&O)Column name Type name Explanation
----------------------------------------------------------------------------------------------------------------
$COID CHARACTER* Identification of the profile$COMPID CHARACTER* Same
USER_NAME CHARACTER* Reserved for VPM
ENV CHARACTER* Name of the environment for the profile
MACRO_NAME VARCHAR Name of the environment for the profile_LIST
CATIA.CONAME (table managing every available environment )Column name Type name Explanation
----------------------------------------------------------------------------------------------------------------$COID CHARACTER* $COID of the project
$COMPID CHARACTER* Environment name
S_CONAME VARCHAR Root complex object name (ENVNAME.PART_LIST)
8/17/2019 ENOVIA VPM Training
26/190
Copyright DASSAULT SYSTEMES 2000 1-26 Menu
VPM Programming
CATIA.PROJECT (table in which everyproject are defined)Column name Type name Explanation
----------------------------------------------------------------------------------------------------------------
$COID CHARACTER* Identification of the project
$COMPID CHARACTER* 00000000 for a projectS_PROJECT VARCHAR Name of the project
CATIA.PRODUCT (table used to store CSB product)Column name Type name Explanation
----------------------------------------------------------------------------------------------------------------
$COID CHARACTER* Product id
$COMPID CHARACTER* Component identifier of the object
S_COID_REF CHARACTER* COID of the product part
S_ENV_REF CHARACTER* Name of the referenced environment
S_TABLE_REF CHARACTER* Name of the referenced environment
U_PRODNAM CHARACTER* Not used
EVENTS ( events library )Column name Type name Explanation
----------------------------------------------------------------------------------------------------------------
EVENT_OID CHARACTER* Object Id in EVENTS table
EVENT_NAME VARCHAR Part Delete, Action Promote ...
FATHER_OID CHARACTER* Reserved for futur use
PSTYPE_OWNER VARCHAR Not used
PSTYPE_NAME VARCHAR Not used
8/17/2019 ENOVIA VPM Training
27/190
Copyright DASSAULT SYSTEMES 2000 1-27 Menu
VPM Programming
EXP_SUBSCRIBERS (subscribers)Column name Type name Explanation
----------------------------------------------------------------------------------------------------------------
SUBSCRIBER_OID CHARACTER* User Id of the person suscribing
PUBLISHER_OID CHARACTER* OID of the published objectEVENT_OID CHARACTER* OID of the concerned event
SYNC_DATE TIMESTAMP Publish date
SUBSCRIBER_TYPE VARCHAR Not used
ACTION_TYPE VARCHAR Shell if request ( mail for suscribe with mail)
ACTION VARCHAR Name of the shell to launch
ACTION_DATA VARCHAR Parametres for the shell (OID, TIMESTAMP)
SUB_NICKNAME VARCHAR Parametres for the shell (email address ...)
PUB_NICKNAME VARCHAR Parametres for the shell (suscriber Id ...)
PUBLISHED_EVENTS (available events)Column name Type name Explanation
----------------------------------------------------------------------------------------------------------------
PUBLISHER_OID CHARACTER* OID of the published object
EVENT_OID CHARACTER* OID of the published event
PUBLISH_DATE TIMESTAMP Publish date
RDB_DOCUMENTS (link between action data & BLOB storage)Column name Type name Explanation
----------------------------------------------------------------------------------------------------------------
OID_DOC VARCHAR OID of the documentation
DOC_USAGE VARCHAR type of stored data
DESCRIPTION VARCHAR data description
DOC_APPLICATION VARCHAR viewer used to open the document
(empty for action)
DOC_FORMAT CHARACTER* extention used referencing the viewer
ACC_MET CHARACTER* BLOB - join BLOB storage table
(RDB_DOC_BLOB)
8/17/2019 ENOVIA VPM Training
28/190
Copyright DASSAULT SYSTEMES 2000 1-28 Menu
VPM Programming
All tables (except the three Pub-Sub tables) have six comon attributs :Column name Type name Explanation
----------------------------------------------------------------------------------------------------------------
OID VARCHAR Object Id
VIRTUAL_OID VARCHAR Not usedTYPE VARCHAR Object type
OID_DOC VARCHAR OID of the linked document
LAST_MODIFIER_ID CHARACTER* Data Base id of the last modifier
LAST_UPDATE_DATE TIMESTAMP Date of the last modification
organization_Column name Type name Explanation
----------------------------------------------------------------------------------------------------------------
id CHARACTER* Organization’s Id
name CHARACTER* name given at the creation
description VARCHAR description given at the creation
address VARCHAR address given at the creation
relating_org VARCHAR Organization parents OID
relating_org_ VARCHAR Organization parents OID in the view table
manager_ VARCHAR Manager OID in person_ table
manager VARCHAR Manager OID in person_ view table
role_Column name Type name Explanation
----------------------------------------------------------------------------------------------------------------
name CHARACTER* Name of the role
description VARCHAR description
belongs_to_ VARCHAR OID of the referenced oganization
belongs_to VARCHAR OID of the referenced oganization view
relating_role VARCHAR Reserved for futur use
relating_role_ VARCHAR Reserved for futur use
8/17/2019 ENOVIA VPM Training
29/190
Copyright DASSAULT SYSTEMES 2000 1-29 Menu
VPM Programming
person_Column name Type name Explanation
----------------------------------------------------------------------------------------------------------------
id CHARACTER* id of the person
last_name VARCHAR last name of the personfirst_name VARCHAR first name of the person
belongs_to VARCHAR OID of the referenced oganization
belongs_to_ VARCHAR OID of the referenced oganization view
phone_number CHARACTER* Phone_number
address VARCHAR address
email VARCHAR email
current_role VARCHAR OID of the attached role
current_role_ VARCHAR OID of the attached role view in role_ table
access_object_ (privilege management)Column name Type name Explanation
----------------------------------------------------------------------------------------------------------------
id CHARACTER* OID of the relating role
someone VARCHAR OID of the relating person
owner VARCHAR OID of the creator (person)
application VARCHAR OID of the relating application (VPM)
func VARCHAR OID of the relating function (BOM)command VARCHAR OID of the relating command (Create Part)
workspace VARCHAR Reserved for futur use
authorization INTEGER Revoke & Grant management
data_in VARCHAR link to data group or profile environment
data_out VARCHAR link on profile
8/17/2019 ENOVIA VPM Training
30/190
Copyright DASSAULT SYSTEMES 2000 1-30 Menu
VPM Programming
data_group_Column name Type name Explanation
----------------------------------------------------------------------------------------------------------------
name VARCHAR Name of the data group
group_type VARCHAR Data group type ( My_Data / My Org_Data)owner VARCHAR OID of the creator in person_ table
description VARCHAR description given at the creation
usage VARCHAR not used
process_Column name Type name Explanation
----------------------------------------------------------------------------------------------------------------
application VARCHAR VPM, VPMAdmin ...
func VARCHAR BOM, Action ...
command VARCHAR Create Part, Promote action ...
owner VARCHAR OID of the (Process group) creator in person_ table
description VARCHAR description given at the creation
configuration0001_ (configuration item associed to each configurable part)Column name Type name Explanation
----------------------------------------------------------------------------------------------------------------
id VARCHAR id of configuration item
description VARCHAR description - not used
design VARCHAR UID of the part set configurable
owner VARCHAR not used
status VARCHAR not used
released INTEGER not used
8/17/2019 ENOVIA VPM Training
31/190
Copyright DASSAULT SYSTEMES 2000 1-31 Menu
VPM Programming
effectivity_Column name Type name Explanation
----------------------------------------------------------------------------------------------------------------
id VARCHAR effectivity id
description VARCHAR not usedstatus VARCHAR Validated modification or not
released INTEGER Not used
start_range INTEGER start range
end_range INTEGER end range
start_program VARCHAR
start_id VARCHAR
end_program VARCHAR
end_id VARCHAR
start_date INTEGER start dateend_date INTEGER end date
lot_id VARCHAR specific type of effectivity - not used
lot_size VARCHAR specific type of effectivity - not used
modif_id VARCHAR modificatoin tag (by default , action id)
action_type VARCHAR add / del link in PSN (`+’/’-’ in info link panel)
validation VARCHAR not used
oldlink VARCHAR optional modification
option_id VARCHAR option name
option_type VARCHAR simple option or complex option (with date/range)
option_start INTEGER Start (/ End) date (/range) when option is combined
option_end INTEGER with a date (/range)
option_lot_id VARCHAR not used
pack_type VARCHAR
pack_start INTEGER
pack_end INTEGER
pack_lot_id VARCHAR
pack_name VARCHAR Name of the pack
8/17/2019 ENOVIA VPM Training
32/190
Copyright DASSAULT SYSTEMES 2000 1-32 Menu
VPM Programming
configuration0002_ (configuration handlers)Column name Type name Explanation
----------------------------------------------------------------------------------------------------------------
id VARCHAR id given to the CH at the creation
CUR_DATE VARCHAR current date (flag)description VARCHAR description given at the creation
apply VARCHAR UID product
status VARCHAR not used
owner VARCHAR OID of the creator in the person table - not used
flag_frozen INTEGER not used
released INTEGER not used
organization VARCHAR
visibility VARCHAR
EFFTYPE_FOR_PART_ (Set configurable data)Column name Type name Explanation
----------------------------------------------------------------------------------------------------------------
PARTID VARCHAR UID of the configurable part
ALLOWED_TYPE INTEGER type of the allowed effectivity
PART_EFFLINK_ (Paste effectivity data)Column name Type name Explanation
----------------------------------------------------------------------------------------------------------------
PART_ID VARCHAR UID of the part on which you pasted effectivity
PART_CHILD VARCHAR UID of the copied part
8/17/2019 ENOVIA VPM Training
33/190
Copyright DASSAULT SYSTEMES 2000 1-33 Menu
VPM Programming
Action_Column name Type name Explanation
----------------------------------------------------------------------------------------------------------------
nbr INTEGER action number
name VARCHAR action id (type, number & subnumber combined)secondary_id VARCHAR customized id (= action id by default)
action_type VARCHAR type given at the creation
description VARCHAR abstract
creator VARCHAR id of the creator
owner VARCHAR id of the owner
organization VARCHAR id of the creator’s organisation
priority VARCHAR priority given to the action
status VARCHAR status of the action
start_date VARCHAR Target start date (yyyy-mm-dd-hh.mm.dd)end_date VARCHAR Target end date (yyyy-mm-dd-hh.mm.dd)
various VARCHAR control parameter (system parameter)
working_eff VARCHAR modification tag (used for query)
applicability_0001 VARCHAR industrial eff type at validation time
applicability_opt VARCHAR option name generated by this action - not used
applicability_min INTEGER range / date (min value) generated by this action
applicability_max INTEGER range / date (max value) generated by this action
proposed_eff_type VARCHAR type of proposed eff (range / date)
proposed_eff_opt VARCHAR option id which has been proposed - not used
proposed_eff_min INTEGER range / date (min value) which has been proposed
proposed_eff_max INTEGER range / date (max value) which has been proposed
product VARCHAR product defined for the action
8/17/2019 ENOVIA VPM Training
34/190
8/17/2019 ENOVIA VPM Training
35/190
Copyright DASSAULT SYSTEMES 2000 1-35 Menu
VPM Programming
MILESTONEColumn name Type name Explanation
----------------------------------------------------------------------------------------------------------------
ID VARCHAR Milestone ID
PROGRAM VARCHAR Program NamePRODUCT VARCHAR Part Reference
DESCRIPTION VARCHAR Milestone Description
PROGRAM_STEP VARCHAR
PHASE VARCHAR
MILESTONE_TYPE VARCHAR Date / Range
MILESTONE_VALUE INTEGER Milestone Value
VALUE_MIN INTEGER
VALUE_MAX INTEGER
FROZEN INTEGER Frozen StatusSTATUS VARCHAR
OWNER VARCHAR Owner of the Milestone
ORGANIZATION VARCHAR Organization
MML_ENTITYColumn name Type name Explanation
----------------------------------------------------------------------------------------------------------------
OBJECT_CATAB VARCHAR Model Table (CATIA_MODEL)
OBJECT_COID CHARACTER Model CoidOBJECT_COMPID CHARACTER Model Compid
ENTITY_ID_1 CHARACTER Entity UID (first part)
ENTITY_ID_2 CHARACTER Entity UID (second part)
ENTITY_KEY CHARACTER Entity Key
ENTITY_NICKNAME VARCHAR Not Used
TS TIMESTAMP Entity Timestamp
UBIT CHARACTER UBIT
8/17/2019 ENOVIA VPM Training
36/190
Copyright DASSAULT SYSTEMES 2000 1-36 Menu
VPM Programming
MML_LINKColumn name Type name Explanation
----------------------------------------------------------------------------------------------------------------
OBJECT_CATAB VARCHAR Model Table
OBJECT_COID CHARACTER Model CoidOBJECT_COMPID CHARACTER Model Compid
ENTITY_ID_1 CHARACTER Entity UID (first part)
ENTITY_ID_2 CHARACTER Entity UID (second part)
ENTITY_KEY CHARACTER Entity Key
TYPE CHARACTER Link Type
TS TIMESTAMP Link Timestamp
STATUS CHARACTER Link Status
UBIT CHARACTER UBIT
8/17/2019 ENOVIA VPM Training
37/190
Copyright DASSAULT SYSTEMES 2000 1-37 Menu
VPM Programming
Index
8/17/2019 ENOVIA VPM Training
38/190
8/17/2019 ENOVIA VPM Training
39/190
Copyright DASSAULT SYSTEMES 2000 1-39 Menu
VPM Programming
BOM: Links between objects
8/17/2019 ENOVIA VPM Training
40/190
Copyright DASSAULT SYSTEMES 2000 1-40 Menu
VPM Programming
BOM: Repository links - Model inside DB
8/17/2019 ENOVIA VPM Training
41/190
Copyright DASSAULT SYSTEMES 2000 1-41 Menu
VPM Programming
BOM: Repository links - Model outside DB
8/17/2019 ENOVIA VPM Training
42/190
Copyright DASSAULT SYSTEMES 2000 1-42 Menu
VPM Programming
BOM: Repository links - DOCUMENT inside DB
8/17/2019 ENOVIA VPM Training
43/190
Copyright DASSAULT SYSTEMES 2000 1-43 Menu
VPM Programming
BOM: Repository links - Document outside DB
8/17/2019 ENOVIA VPM Training
44/190
Copyright DASSAULT SYSTEMES 2000 1-44 Menu
VPM Programming
BOM: Repository links - Document outside DB
8/17/2019 ENOVIA VPM Training
45/190
Copyright DASSAULT SYSTEMES 2000 1-45 Menu
VPM Programming
BOM: Assembly links between objects
8/17/2019 ENOVIA VPM Training
46/190
Copyright DASSAULT SYSTEMES 2000 1-46 Menu
VPM Programming
BOM: MML links between objects
8/17/2019 ENOVIA VPM Training
47/190
Copyright DASSAULT SYSTEMES 2000 1-47 Menu
VPM Programming
BOM: Lock
8/17/2019 ENOVIA VPM Training
48/190
8/17/2019 ENOVIA VPM Training
49/190
Copyright DASSAULT SYSTEMES 2000 1-49 Menu
VPM Programming
BOM: Zone
8/17/2019 ENOVIA VPM Training
50/190
Copyright DASSAULT SYSTEMES 2000 1-50 Menu
VPM Programming
Configuration item and effectivity
8/17/2019 ENOVIA VPM Training
51/190
Copyright DASSAULT SYSTEMES 2000 1-51 Menu
VPM Programming
Effectivity view
8/17/2019 ENOVIA VPM Training
52/190
Copyright DASSAULT SYSTEMES 2000 1-52 Menu
VPM Programming
8/17/2019 ENOVIA VPM Training
53/190
Copyright DASSAULT SYSTEMES 2000 1-53 Menu
VPM Programming
Dictionaries
8/17/2019 ENOVIA VPM Training
54/190
Copyright DASSAULT SYSTEMES 2000 1-54 Menu
VPM Programming
Milestones
8/17/2019 ENOVIA VPM Training
55/190
Copyright DASSAULT SYSTEMES 2000 1-55 Menu
VPM Programming
8/17/2019 ENOVIA VPM Training
56/190
Copyright DASSAULT SYSTEMES 2000 1-56 Menu
VPM Programming
People & Organisation
8/17/2019 ENOVIA VPM Training
57/190
Copyright DASSAULT SYSTEMES 2000 1-57 Menu
VPM Programming
Security
8/17/2019 ENOVIA VPM Training
58/190
Copyright DASSAULT SYSTEMES 2000 1-58 Menu
VPM Programming
Security view
8/17/2019 ENOVIA VPM Training
59/190
8/17/2019 ENOVIA VPM Training
60/190
Copyright DASSAULT SYSTEMES 2000 1-60 Menu
VPM Programming
Action
8/17/2019 ENOVIA VPM Training
61/190
Copyright DASSAULT SYSTEMES 2000 1-61 Menu
VPM Programming
Publish - Subscribe
8/17/2019 ENOVIA VPM Training
62/190
Copyright DASSAULT SYSTEMES 2000 1-62 Menu
VPM Programming
8/17/2019 ENOVIA VPM Training
63/190
Copyright DASSAULT SYSTEMES 2000 1-63 Menu
VPM Programming
Appendix 4 - Environment Table Administration
Creating a Project:1. Edit a command stream file CreateProject with the following content:
(See sample in $CAT_CUST/InstallVPM/reffiles/DBMS/VPINSTC2)
*ON_CST_ERROR STOP*ON_ERROR STOP
*COMMAND VPPARCUS*RUN
*COMMAND VPPARPRO
*RUN*COMMANDASSIGN ‘ 00000000 ’ TO GLOBAL_T ;ASSIGN ‘T’ TO GLOBAL_VARIABLE_NAME ;RUN OID_TO_HEXA ;;
EXECUTE IMMEDIATEINSERT INTO &DICOCATI.PROJECT($COID, $COMPID, S_PROJECT)VALUES(&COID_PROJX, &TX, ‘ ProjectName ’);;
EXECUTE IMMEDIATECOMMIT WORK ;;*RUN
2. Change the value of catcdm.c_stream in USRENV.dcls to reference the directory where thecommand stream file is located.
3. Test that this directory is referenced as first directory by using the catpath command:catpath -l -A catcdm.c_stream
4. Run the dbcdmb commanddbcdmb CreateProject -u DbAdmin -p DbAdminPassword
8/17/2019 ENOVIA VPM Training
64/190
Copyright DASSAULT SYSTEMES 2000 1-64 Menu
VPM Programming
Deleting a ProfileThis is done in three steps:1. Remove the link Role / Profile (only for specific profiles declared in P&O):
With P&O: delete the proper row in the tab Privilege2. Remove the link Profile / Environment (only for specific profiles declared in P&O):
Two possibilitiesa. With P&O: delete the proper objects in the tab Profileb. In the Data Base with the following instruction:
db2: delete from PROFILE.PROFILE_USER where MACRO_NAME = ‘ ProfileName ’Oracle: delete from PROFILE.PROFILE_USER where MACRO_NAME = ‘ ProfileName ’;
3. Remove the physical data of the profile in the Data Basedb2: delete from CDM.MACRO_LIST where MACRO_NAME = ‘ ProfileName ’Oracle: delete from CDM.MACRO_LIST where MACRO_NAME = ‘ ProfileName ’;
Deleting an EnvironmentThis is done in five steps:1. Identify the profiles (other than the default profiles) belonging to the environment. Two
possibilities:a. With P&O: in the tab Profileb. In the Data Base with the following instruction:
db2: select MACRO_NAME from PROFILE.PROFILE_USER where ENV = ‘ EnviromentName ’Oracle: select MACRO_NAME from PROFILE.PROFILE_USER where ENV = ‘ EnviromentName ’;
2. Remove all the specific and default profile in the database Note : See former paragraph.
3. Remove the declaration of the environment:db2: delete from CATIA_CONAME where S_CONAME = ‘ EnviromentName .PART_LIST’Oracle: delete from CATIA_CONAME where S_CONAME = ‘ EnviromentName .PART_LIST’;
4. Remove the the table declarations and triggers in the CDM dictionary:db2: delete from CDM.$COROUTINES where $CREATOR = ‘ EnviromentName ’Oracle: delete from CDM.$COROUTINES where $CREATOR = ‘ EnviromentName ’;
5. Remove tables and views of the environment.In order to list all tables and views in the data base, use the following instructions:
db2: list tables for schema EnvironmentNameOracle: select table_name from all_tables where owner = ‘ EnviromentName ’;
8/17/2019 ENOVIA VPM Training
65/190
Copyright DASSAULT SYSTEMES 2000 1-65 Menu
VPM Programming
Deleting a ProjectThis is done in three steps:1. List the environments belonging to the project:
db2: select S_CONAME from CATIA.CONAME where $COID = ‘ $COIDofProject ’Oracle: select S_CONAME from CATIA.CONAME where $COID = ‘ $COIDofProject ’;
2. Remove these associated environments: Note : You can in one shot delete the declarations of all environments belonging to the project. The third step
of the former paragraph will be completed for all the environments using the following instructions:
db2: delete from CATIA.CONAME where $COID = ‘ $COIDofProject ’Oracle: delete from CATIA.CONAME where $COID = ‘ $COIDofProject ’;
3. Remove the project declaration:db2: delete from CATIA.PROJECT where S_PROJECT = ‘ ProjectName ’Oracle: delete from CATIA.PROJECT where S_PROJECT = ‘ ProjectName ’;
8/17/2019 ENOVIA VPM Training
66/190
8/17/2019 ENOVIA VPM Training
67/190
Copyright DASSAULT SYSTEMES 2000 1-67 Menu
VPM Programming
Appendix 5 - C++ Reminder
Memory ManagementIn C++, the memory management is handled with two following instructions:1. new
char * String = new char[50]; // Reserves a memory space for 50 characters // Caution: this string can save only 49 characters!
2. deletedelete String; // Release the memory space referenced by String
3. void * memcpy (void * Targ, const void * Source, unsigned Count);Copies Count octets from Source to Targ.
String ManagementThe following functionalities are available in stdlib.h1. String copy:
char * strcpy (char * Targ, const char * Source);Copies Source, including the termination null chracter ‘\0’, to the location specified byTarg, and returns Targ. No overflow checking is performed when strings are copied or appended.
char * strncpy (char * Targ, const char * Source, unsigned Count);Copies the initial Count characters of Source to Targ, and returns Targ. If Count is lessthan or equal to the length of Source, a null character is not automatically appended tothe copied string.
2. String concatenation:char * strcat (char * Left, const char * Right);
Appends Right to Left and terminates the resulting string with a null character. Nooverflow checking is performed when strings are copied or appended.
char * strncat (char * Left, const char * Right, unsigned Count); Appends, at most, the first Count characters of Right to Left.
8/17/2019 ENOVIA VPM Training
68/190
Copyright DASSAULT SYSTEMES 2000 1-68 Menu
VPM Programming
3. String comparison:char * strcmp (const char * Str1, const char * Str2);
Compares the two string Str1 and Str2.The return value for each of these functions indicates the lexicographic relation of Str1to Str2.
Value Relationship of Str1 to Str20 Str1 greater than Str2
char * strncmp (const char * Str1, const char * Str2, unsigned Count );Compares, at most, the first Count characters in Str1 and Str2.
char * strcimp (const char * Str1, const char * Str2);Same as strcmp but does not differentiate lower and upper cases.
char * strnicmp (const char * Str1, const char * Str2, unsigned Count );Same as strncmp but does not differentiate lower and upper cases.
String and I/O ManagementThese functionalities are available in stdio.h1. printf (const char * format, ...)
Note : Declared in in stdio.hSyntax for format:
int %dfloat %e %f %gdouble %le %lf char * %s
2. sprintf (char * Buffer, const char * format, ...)
3. cout Note : Declared in in iostream.hcout
8/17/2019 ENOVIA VPM Training
69/190
Copyright DASSAULT SYSTEMES 2000 1-69 Menu
VPM Programming
File ManagementInstructions available in fstream.h
char * Buffer1 = new char[50];char * Buffer2 = new char[50];char * FileName = new char[50];fstream File; // Object created to open a connectionstrcpy (FileName, “Test.txt”); // Test.txt: toto tutuFile.open(FileName, ios::in ); // Open the file FileName in read mode
/* File.open(FileName, ios::out ); Open the file FileName in write mode */ /* File.open(FileName, ios::in | ios::out); Open the file FileName in R/W mode */ if (!File)
cout Buffer1; // The value of Buffer1 is “toto”File >> Buffer2; // The value of Buffer2 is “tutu”}
File.close(); // Close the connectiondelete Buffer1[];delete Buffer2[];delete FileName[];
UNIX InterfaceThis functionality is available in stdlib.h
char * getenv (char *);
Can be used under UNIX in oder to get the value of an environment declarative variable. Example : char * User = getenv(“USER”);
8/17/2019 ENOVIA VPM Training
70/190
Copyright DASSAULT SYSTEMES 2000 1-70 Menu
VPM Programming
8/17/2019 ENOVIA VPM Training
71/190
Copyright DASSAULT SYSTEMES 2000 1-71 Menu
VPM Programming
Appendix 6 - Headers
CATDMUsrMethod.hlibLV0XUSR.a
/* -*-c++-*-*/ // COPYRIGHT DASSAULT SYSTEMES 1997 //============================================================================= // // CATDMUsrMethod: // Contains all the user exits related to BOM // //============================================================================= // Usage Notes: // //============================================================================= // Sep. 97 Creation
//=============================================================================
#ifndef CATDMUsrMethod_h#define CATDMUsrMethod_h
#include
// Modification types for commitenum ModificationType { ADDLINK=1, REMOVELINK=2, MOVELINK=4, REPLACELINK=8,
MOVEREPLACELINK=4+8, RENAMELINK=16, ADDLINKTOCONF=32+1 };
// Action types for versioningenum RevVerAction{ ACTION_NEW, ACTION_UPDATE};
// Actions for config-handlers controlenum CHAction{ CH_CREATE, CH_RENAME, CH_DUPLICATE, CH_DELETE, CH_EDIT_CONTENT, // editer la definition(contenu) du CH CH_EDIT_LINK, // editer les liens du CH (CHs children et brothers) CH_CHANGE_OWNER};
8/17/2019 ENOVIA VPM Training
72/190
8/17/2019 ENOVIA VPM Training
73/190
Copyright DASSAULT SYSTEMES 2000 1-73 Menu
VPM Programming
* Note:
* * Following convention is used for naming parameters: parameter
names prefixed by: * * i are input parameters * o are ouput
parameters
* io are input/output parameters * */
class CATDMUsrMethod{ public: //---------------------------------------- // Additional tools and methods management //---------------------------------------- static Error ExecuteUsrMethod (const char *iMethodName, const int &iNbSelectedInstances, ObjID *iSelectedObjects);
static Error OpenPSNWithUsrMethod (const char* iMethodName, const int& iNbSelectedInstances, int* iDepthArray, PartAsmID** iObjArray, double** iComputedXmatArray);
//------------------- // PSN save management //------------------- /** * Allows customization of the proposed values list in the * Modification Name combo, when commiting changes on a configurable * part in PSN. *
* If method does not provide a history list (oHistSize=0), * the caller method will use default history. * Allocation of oHistory’s elements has to be done in function * GetConfNameHistory. * Desallocation is the responsability of VPM. * * @param iUser * user name * @param iOrg
* user organization * @param oHistory * points on the list of proposed values * @param oHistSize * number of proposed values */ static void GetConfNameHistory (const char iUser[9], const char iOrg[11], char*** oHistory, int* oHistSize);
8/17/2019 ENOVIA VPM Training
74/190
Copyright DASSAULT SYSTEMES 2000 1-74 Menu
VPM Programming
/** * Allows user to validate keyed flag versus current modifications. * * @param iModificationFlag * flag which is going to be used in order to save following modifications * @param iModificationFlag
* number of modifications * @param iTypeOfModifications * types of the modifications * @param iAddedLinks * list of added links * @param iRemovedLinks * list of removed links * * @return * If method return an error, another modification flag must * be keyed or commit canceled. */ static Error IsAValidFlagForCommit (const char* iModificationFlag, const int iNbModifications, int* iTypeOfModifications, ObjID* iAddedLinks, ObjID* iRemovedLinks);
/** * User exit called when saving Product Structure
modifications * @return * 1 Action flow will test whether the
current user/role has the right to * write the modifications
(maintenance phase)
* 0 Action flow won’t be called when saving the modifications *
(development phase) */ static int ActionFlowCheck (const char
*iModificationFlag, const char *iUser);
static Error SuccessfullyCommitInGraph (const char* iModificationFlag, const int iNbModifications, int* iTypeOfModifications, ObjID* iAddedLinks, ObjID* iRemovedLinks);
static void SuccessfullyRollBackInGraph ();
//------------------------- // Modifications management //-------------------------
/** * User exit called when validating action and commiting PSN graph modifications * @param iModif * Modification to validate * @param oType * Type of the validation (option, range, date, pack, option_range, option_date, * pack_range, pack_date) * @param oOptListSize
8/17/2019 ENOVIA VPM Training
75/190
Copyright DASSAULT SYSTEMES 2000 1-75 Menu
VPM Programming
* Number of options in oOptList * = 1 if type is equal “option”, “option_range” or “option_date” * = n if type is equal “pack”, “pack_range” or “pack_date” * @param oOptList * significant only if oType is equal to “option”, “option_range”, * “option_date”, “pack”, “pack_range” or “pack_date”
* @param oRangeBot * significant only if oType is equal to “range”, “option_range” * or “pack_range” * @param oRangeTop * significant only if oType is equal to “range”, “option_range” * or “pack_range” * @param oDateBeg * significant only if oType is equal to “date”, “option_date” * or “pack_date” * @param oDateEnd * significant only if oType is equal to “date”, “option_date” * or “pack_date” * * @return * If Error.Ier equals 0 validation is done, else error message is displayed */ static Error DefaultModValidation (const char *iModif, char **oType, int &oOptListSize, char ***oOptList, int&oRangeBot, int &oRangeTop, time_t &oDateBeg, time_t &oDateEnd);
/** * User exit called when validating a modification * @param iModification * Modification to validate * @param iUser * Identifier of the user * @param iValidationType * Type of the validation (option, range, date, pack, option_range, option_date, * pack_range, pack_date) * @param iNbOptions * Number of options in iOptionList * = 1 if type is equal “option”, “option_range” or “option_date” * = n if type is equal “pack”, “pack_range” or “pack_date” * @param iOptionList * significant only if iValidationType is equal to “option”, “option_range”, * “option_date”, “pack”, “pack_range” or “pack_date” * @param iRangeBot * significant only if iValidationType is equal to “range”, “option_range“ * or “pack_range” * @param iRangeTop * significant only if iValidationType is equal to “range”, “option_range“
* or “pack_range” * @param iDateBeg * significant only if iValidationType is equal to “date”, “option_date” * or “pack_date” * @param iDateEnd * significant only if iValidationType is equal to “date”, “option_date” * or “pack_date” * * @return
8/17/2019 ENOVIA VPM Training
76/190
Copyright DASSAULT SYSTEMES 2000 1-76 Menu
VPM Programming
* If Error.Ier equals 0 validation is allowed, else error message is displayed */ static Error AuthorizedModValidation (const char *iModification, const char *iUser, const char *iValidationType, const int iNbOptions,
char **iOptionList, const int iRangeBot, const int iRangeTop, const time_t iDateBeg, const time_t iDateEnd);
/** * User exit called when promoting a modification * * @return * If Error.Ier equals 0 promote is allowed, else error message is displayed */ static Error AuthorizedModPromote (const char *iModification, const char *iUser); /** * User exit called when demoting a modification * * @return * If Error.Ier equals 0 demote is allowed, else error message is displayed */ static Error AuthorizedModDemote (const char *iModification, const char *iUser); /** * User exit called when deleting a modification * * @return * If Error.Ier equals 0 delete is allowed, else error message is displayed */ static Error AuthorizedModDelete (const char *iModification, const char *iUser); /** * User exit called when creating a modification * * @return * 0 iModification will be of Personal type and belongs to iUser * (only iUser will see iModification until promoted) * 1 iModification will be of Public type (everybody can see it) */ static int ModCreateOwner (const char *iModification, const char *iUser);
//----------------------------------------------------------------- // Check user authorization for basic operations // Operations are performed if no error (error code =0) is returned //----------------------------------------------------------------- // Cut link
static Error AuthorizedCut (const ObjID& iLink);
// Move Link static Error AuthorizedMove (const ObjID& iLink);
// Create Link (with paste method) static Error AuthorizedPaste (const ObjID& iFather, const ObjID& iChild);
// CheckIn object
8/17/2019 ENOVIA VPM Training
77/190
Copyright DASSAULT SYSTEMES 2000 1-77 Menu
VPM Programming
static Error AuthorizedCheckIn (const ObjID& iObj);
// CheckOut object static Error AuthorizedCheckOut (const ObjID& iObj);
// Delete object
static Error AuthorizedDelete (const ObjID& iObj);
// Create object static Error AuthorizedCreate (const ObjID& iObj);
// Update object static Error AuthorizedUpdate (const ObjID& iObj);
// Replace static Error AuthorizedReplace (const ObjID& iFather,const ObjID& iLink, const ObjID& iChild,const ObjID& iNewChild);
/** * Checks autorisation before saving model in CATIA V4. * * @return * 0 means save is authorized in CATIA V4 * not 0 it is an error code : * => save in CATIA will not be performed * */ static int AuthorizedCATIASave (const ObjID& iObj);
// Change maturity static Error AuthorizedPromotion (const ObjID& iObj, const char* iOldStatus, const char* iNewStatus);
/** * User exit called when changing ownership. * * @return * If Error.Ier equals 0 modification is allowed, else error message is * displayed. */ static Error AuthorizedReassign (const ObjID& iObj, const char iUser[9], const char iOrg[11]);
* -2 Help values with first value as default value
* 1 Authorized values without default value
* 2 Authorized values with first value as default value * *
@param oNbValues * number of values returned * @param oValues
8/17/2019 ENOVIA VPM Training
78/190
Copyright DASSAULT SYSTEMES 2000 1-78 Menu
VPM Programming
* list of values (this array is allocated and deleted by VPM) */ static void GetInputListOfValues (const char* iCatab, const char* iAttribute, int* oAuthorized=0, int* oNbValues=0,
char*** oValues=0);
/** * Allows to check attribute values or to valuate company
attributes * before writing a part or an object. * * @param iUpdate
* 0 user-exit called in write context
* 1 user-exit called in update context * @param iCaenv * Owner of
the environment into which the object is being written * @param
iCatab * Name of the table into which the object is being written *
@param iNbAttPart * Number of attributes given for the part *
@param iNbAttObj * Number of attributes given for the object *
@param ioAttNames * Names of the given attributes for the part and
the object being written * (array size : iNbAttPart + iNbAttObj) *
@param ioAttVals * Values of the given attributes for the part and
the object being written * (array size : iNbAttPart + iNbAttObj) *
* @return * The method must return 0 if the operation is accepted
or error code * if it is refused. In such a case, an error message
is displayed in an * error notification panel and the operation is
canceled. * The attributes given in the list are the ones that were
valuated in * the insert panel. If you wish to valuate a “hidden”
attribute, you * will have to reallocate AttNames and AttVals and
add the attribute * and its value. */ static Error
ComputeValuesBeforeWrite (const int iUpdate, const char* const
iCaenv, const char* const iCatab, int *iNbAttPart, int *iNbAttObj,
char ***ioAttNames, char ***ioAttVals);
//---------------------- // Long Field management //---------------------- /** * Allows to check source location or to customize LF management * * @param iCaenv * Owner of the environment into which the object is being written
8/17/2019 ENOVIA VPM Training
79/190
Copyright DASSAULT SYSTEMES 2000 1-79 Menu
VPM Programming
* @param iCatab * Name of the table into which the object is
being written * @param iSource * Where the LF (long field) comes
from :
* 1 File
* 2 CATIA V4
* 3 New one (empty)
* 4 Object in database
* 5 Document
* 7 DENEB product * @param ioPath * Significant only when iSource
is equal to “File” (1).
* It is the full path of the file. * @param ioObj * Significant
only when iSource is equal to “Object in database” (4).
* @param ioRepository * Where the LF is going to be written * *
@return * The method must return 0 if the operation is accepted or
error code * if it is refused. In such a case, an error message is
displayed in an * error notification panel and the operation is
canceled. */ static Error CheckLFBeforeWrite (const char* const
iCaenv, const char* const iCatab, const int iSource, char **ioPath,
ObjID *ioObj, char** ioRepository);
//---------------------------- // Version/revision management
//---------------------------- /** * Provides a list of proposed
values upon creation/update of a * version.
* If number of values is greater than 0, the values will be *
displayed in a list inside input panel. *
* Note : used in NEW revisioning mode * * @param iobj * object from which we want to create a new version * @param iMaturity * maturity of the object * @param iLastRev
* last existing version number * @param iCurRev * version number of the object being handled * @param oNbVerValues * number of values returned * @param oVerValues * list of values (memory has to be allocated within the user * exit ; it is freed by the caller) * @param oAuthorized
8/17/2019 ENOVIA VPM Training
80/190
Copyright DASSAULT SYSTEMES 2000 1-80 Menu
VPM Programming
* decides if output values are to be taken as authorized values * (default is : help values) */ static void GetNewVersionListOfValues (const ObjID& iObj , const char* iMaturity , const char* iLastVer ,
const char* iCurVer , int* oNbVerValues , char*** oVerValues , int* oIsAuthorized);
/** * Provides a list of proposed values upon creation/update of
a * revision.
* If number of values is greater than 0, the values will be *
displayed in a list inside input panel. *
* Note : used in NEW revisioning mode * * @param iObj * object from which we want to create a new revision * @param iMaturity * maturity of the object * @param iLastRev * last existing revision number * @param iCurRev * revision number of the object being handled * @param oNbRevValues * number of values returned * @param oAuthorized * decides if output values are to be taken as authorized values * (default is : help values) */ static void GetNewRevisionListOfValues (const ObjID& iObj , const char* iMaturity , const char* iLastRev , const char* iCurRev , int* oNbRevValues, char*** oRevValues , int* oAuthorized );
/** * Checks the validity of the keyed value for revision . *
* Note : used in NEW revisioning mode * @param iObj
* object from which we want to create a new version * @param iMaturity * maturity of the object * @param iPrevVer * previous version number of the object * @param iNewVer * new version number * @param iAction * create or update operation
8/17/2019 ENOVIA VPM Training
81/190
Copyright DASSAULT SYSTEMES 2000 1-81 Menu
VPM Programming
* @return * The method must return an Error with Ier=0 if the operation is * accepted or error code if it is refused. * In such a case, an error message is displayed in an error * notification panel . */
static Error IsAValidNewVersion (const ObjID& iObj , const char* iMaturity, const char* iPrevVer , const char* iNewVer , const RevVerAction iAction ); /** * Checks the validity of the keyed value for revision. *
* Note : used in NEW revisioning mode * * @param iObj * object from which we want to create a new revision * @param iMaturity * maturity of the object * @param iPrevRev * previous revision number of the object * @param iNewRev * new revision number * @param iAction * create or update operation * * @return * The method must return an Error with Ier=0 if the operation is * accepted or error code if it is refused. * In such a case, an error message is displayed in an error * notification panel. */ static Error IsAValidNewRevision (const ObjID& iObj , const char* iMaturity, const char* iPrevRev , const char* iNewRev , const RevVerAction iAction );
/** * Checks the validity of the keyed value for revision duplication * when versioning a part. *
* Note : used in NEW revisioning mode when declarative * CATCDMA.VPM.VERSION.SELECTREVISION.INPUT is set to TRUE *
* @param iObj * object from which we want to create a new revision * @param iPrevRev * previous revision number of the object * @param iNewRev * new revision number * * @return * The method must return an Error with Ier=0 if the operation is
8/17/2019 ENOVIA VPM Training
82/190
Copyright DASSAULT SYSTEMES 2000 1-82 Menu
VPM Programming
* accepted or error code if it is refused. * In such a case, an error message is displayed in an error * notification panel. */ static Error IsAValidDuplicatedRevision (const ObjID& iObj , const char* iPrevRev,
const char* iNewRev );
/** * Checks the validity of the keyed value for version or revision. *
* Note : used in OLD revisioning mode * @param iObj * object from witch we want to create a new version or revision * @param iVersion * version of the part * @param iOldVerRev * version or revision of iobj * @param iNewVerRev * version or revision keyed * * @return * The method must return an Error with Ier=0 if the operation is * accepted or error code if it is refused. * In such a case, an error message is displayed in an error * notification panel. */ static Error IsAValidRevisionVersion (const ObjID& iObj , const char iVersion[4] , const char iOldVerRev[4], const char iNewVerRev[4]);
/** * Called before creating new part version. *
* Note : used in BOTH revisioning mode * * @param iObj * object
from which we want to create a new version * @param iNewPartNumber
* 0 same part number
* 1 new part number */ static Error AuthorizedNewVersion (const
ObjID& iObj , const int iNewPartNumber);
/** * Called before creating new representation revision. *
* Note : used in BOTH revisioning mode * * @param iObj * object from which we want to create a new revision */ static Error AuthorizedNewRevision (const ObjID& iObj);
8/17/2019 ENOVIA VPM Training
83/190
Copyright DASSAULT SYSTEMES 2000 1-83 Menu
VPM Programming
8/17/2019 ENOVIA VPM Training
84/190
Copyright DASSAULT SYSTEMES 2000 1-84 Menu
VPM Programming
//------------------------ // //----------------------- /** * Allows user to perform specific action before object creation. *
* @param iCaenv * Environment into which the object is going to be created * @param iObject * Object (type) to be created * * @return * If the method return an error, the creation is canceled * and an error message will be displayed in an error * notification panel. */ static Error BeforeCreateUserAction (const char* const iCaenv, const char* const iObject);
//------------------------ // //----------------------- /** * Allows user to perform specific action after write. * * @param iObj * object created * * @return * If the method return an error, a rollback will be performed * and an error message will be displayed in an error * notification panel. */ static Error AfterWriteUserAction (const ObjID& iObj);
//------------------------ // //----------------------- /** * Allows user to perform specific action after commit. * * @param iObj * object created * * @return
* If the method return an error, a rollback will be performed * and an error message will be displayed in an error * notification panel. */ static Error AfterCommitUserAction ();
//------------------------ // //-----------------------
8/17/2019 ENOVIA VPM Training
85/190
8/17/2019 ENOVIA VPM Training
86/190
Copyright DASSAULT SYSTEMES 2000 1-86 Menu
VPM Programming
* list of options name proposed/returned. * @param ioOptTypeList * list of options type proposed. * @param iOptDescList * list of options description proposed/returned. *
* @return * If the method return an error, * and an error message will be displayed in an error * notification panel. */ static Error OptionListToDisplay (const char *iUser, const char *iRole, const char *iOrg, const ObjID& iObj, const int iNbOpt, int &oNbOpt, char ***ioOptNameList, char ***ioOptTypeList, char ***ioOptDescList);
/** * User exit called when modifying an effectivity * * @param iUser * user ID. * @param iRole * user role. * @param iOrg * user organization. * @param iLink * link associated to the effectivity to modify. * @param iOldEff * old effectivity (initial effectivity to modify) * @param iNewEff * new effectivity (effectivity after modifications) * * @return * If Error.Ier equals 0 modification is allowed, else error message is displayed */ static Error AuthorizedEffModification (const char *iUser, const char *iRole, const char *iOrg, const ObjID& iLink, const EffParam& iOldEff, const EffParam& iNewEff);
static Error ConfigHandlerControl (const char *iUser, const char *iRole, const char *iOrg, const ObjID& iProduct, const char* iCHName, const CHAction iAction);
};
#endif
8/17/2019 ENOVIA VPM Training
87/190
Copyright DASSAULT SYSTEMES 2000 1-87 Menu
VPM Programming
CATVpmAFUsrMethod.hlibVX0AFUSR.a
/* -*-c++-*-*/ // COPYRIGHT DASSAULT SYSTEMES 1997
//======================================================================== // // CATVpmAFUsrMethod: // Contains all the user exits related to ActionFlow // //======================================================================== // Usage Notes: // //======================================================================== // Sep. 97 Creation //========================================================================
#ifndef CATVpmAFUsrMethod_h#define CATVpmAFUsrMethod_h
#include “CATDMUsrMethod.h”
//======================================================================== // Type definitions //========================================================================
// // Structure representing an action // typedef struct{ char* identifier; char* secondid; char* type; char* owner; char* priority; char* status; char* product;} Action;
8/17/2019 ENOVIA VPM Training
88/190
Copyright DASSAULT SYSTEMES 2000 1-88 Menu
VPM Programming
//======================================================================== // User Methods //========================================================================
/**
* This class regroups the user exits for Action Flow. * These user exits are static methods called by the Action Flow component, * and which content can be modified by the customer to suit their specific * needs. */
class CATVpmAFUsrMethod{ public :
//----------------------------------------------------------------
// Static data members //----------------------------------------------------------------
static Action _CurrentAction; static ObjID _CurrentActionProduct; // Added VPM1.3
//----------------------------------------------------------------
// Status Graph Customization
//----------------------------------------------------------------
/** * Status Graph customization : *
Executes a user command related to a Status Graph transition. *
* @param iCommandName * command name as defined in the Status Graph * @param iNbParam * number of command parameters * @param iParamList * command parameters passed as a iNbParam sized array of strings * @return error object */ static Error ExecuteUsrCommand (const char * iCommandName, const int & iNbParam,
char ** iParamList);
8/17/2019 ENOVIA VPM Training
89/190
Copyright DASSAULT SYSTEMES 2000 1-89 Menu
VPM Programming
/** * Status Graph customization : *
Retrieves the person identifier relating to a “:Notify” generic
command, *
using the “:EXT” parameter - i.e. the recipient of the
notification. *
* @param iOperationName * operation name as defined in the Status Graph * @param oPersonId * person identifier of the notification recipient * @return error object */ static Error GetNewUsrPersonId (const char * iOperationName, char ** oPersonId);
/** * Status Graph customization :
*
Retrieves the message relating to a “:Notify” generic command.
*
* @param iOperationName * operation name as defined in the
Status Graph * @param oMessageTitle * title (subject) of the
message * @param oMessageText * full message text * @return error
object */ static Error GetUsrMessageText (const char *
iOperationName, char ** oMessageTitle, char ** oMessageText); /** *
Status Graph customization : *
Checks a user condition associated to a status change transition :
*
if an error is returned, (i.e. Ier != 0), the condition is false,
*
otherwise it is true and the operation which it applies to is
executed. *
* @param iConditionName * condition name as defined in the Status Graph * @param iOperationName * operation name as defined in the Status Graph, which the condition applies to
* @return error object */ static Error CheckUsrCondition (const char * iConditionName, const char * iOperationName);
8/17/2019 ENOVIA VPM Training
90/190
Copyright DASSAULT SYSTEMES 2000 1-90 Menu
VPM Programming
//
----------------------------------------------------------------
/** * Action Property Editor customization : *
Checks access to an external file when trying to associate it to
the action *
(by reference) : if an error is returned (i.e. Ier != 0), the file
is
*
not accessible and therefore, the file is not associated while
*
the error message is displayed. *
Also retrieves an updated pathname for this file where accessible.
*
* @param iCurrentFullFileName * full pathname of the selected file * @param oNewFullFileName * full pathname of the accessible file (if NULL, the input name is used) * @return error object */ static Error CheckUsrLibraryAccess (const char * iCurrentFullFileName, char ** oNewFullFileName);
/** * Action Property Editor customization : *
Retrieves action secondary id when creating a new action in *
”secondary id” mode. *
NOTE : this user exit is not called any more and has just been
*
maintained in this header for compatibility reasons (see *
ModifySecondaryId method). *
* @param oSecondId * action secondary id * @param oModifiable * indicates if the action name (i.e. secondary id) can be edited from * within the Action Property Editor window : * ‘Y’ : yes, the action name can be edited * otherwise : the action name cannot be modified * @return error object */ static Error GetUsrSecondaryId (char ** oSecondId, char & oModifiable);
8/17/2019 ENOVIA VPM Training
91/190
Copyright DASSAULT SYSTEMES 2000 1-91 Menu
VPM Programming
/** * Action Property Editor customization : *
Retrieves action secondary id when user modifies action type or id
in *
”secondary id” mode. *
* @param iTypePrefix * action type prefix * @param iTypeName * action type name * @param iCurrentId * action current secondary id (since last modified) * @param iClashMode * = ‘Y’ if save attempt has been made and resulted in a clash due to an existing action with the sameid * @param ioModifiable * indicates if the action name (i.e. secondary id) can be edited from
* within the Action Property Editor window : * ‘Y’ : yes, the action name can be edited * otherwise : the action name cannot be modified * @param oNewId * action secondary id * @return error object */ static Error ModifySecondaryId (const char* iTypePrefix, const char* iTypeName, const char* iCurrentId, char iClashMode, char& ioModifiable, char** oNewId);};
#endif
8/17/2019 ENOVIA VPM Training
92/190
8/17/2019 ENOVIA VPM Training
93/190
Copyright DASSAULT SYSTEMES 2000 1-93 Menu
VPM Programming
/** * UpdatePasswordPermitted () * Determines that the user exit to change the password can be called * and is functional. * * Returns the following values:
* 0 = Update of password is NOT permitted. * 1 = Update of password is permitted, but original password is NOT * required. * 2 = Update of password is permitted, AND original password IS * required. **/ static int ChangePasswordEnabled () ;
/** * ChangePassword () * Modifies the password of customer specific VPM components. * * Returns the following values. * -1 = Original password is incorrect. * 0 = General failure of password change. * 1 = Password modification successful. **/ static int ChangePassword ( const char* iPersonId, const char* iCurrentPasswd, const char* iNewPasswd ) ;
/** * ValidateUserId( char *iUserId ) * ValidatePassword( char *iPassword ) * Level of validation is implementation specific. Only basic checking is * managed here. * * Return values are as follows: * 1 = Validated OK. * 0 = General Failure. * -1 = Too short. * -2 = Too long. * -3 = Combination of alpha and numeric characters required. * -4 = Password and user id cannot be the same. **/ static int ValidateUserId ( const char *iUserId ) ; static int ValidatePassword ( const char *iPassword ) ;};
#endif
8/17/2019 ENOVIA VPM Training
94/190
Copyright DASSAULT SYSTEMES 2000 1-94 Menu
VPM Programming
CATVpmSCUsrManager.hlibVX0PEMNG.a
// COPYRIGHT DASSAULT SYSTEMES 1999 //========================================================================
// // CATVpmSCUsrManager : // VPM Security Manager customer class. // //======================================================================== // Usage Notes: // This class provides : // - information on current VPM user (ID, role) ; // - access check methods on privileges and data owner. // // Any program or library including this header should be linked with module
// VX0PEMNG //======================================================================== // Nov. 99 Creation JIC //========================================================================
#ifndef _CATVpmSCUsrManager_h_#define _CATVpmSCUsrManager_h_
class CATVpmSCUsrManager{ public: /** * ---------------------------------------------------------------------- * GetLoginUserId() * Get the ID of the VPM user currently logged in. * * @return * ID of the VPM user (NULL if not found). * Memory disallocation is in charge of the calling method. * ---------------------------------------------------------------------- **/ static const char* GetLoginUserId ();
/** * ---------------------------------------------------------------------- * GetLoginRoleName() * Get the name of the VPM role used by the current user to log in. * * @return * Name of the VPM role (NULL if not found).
8/17/2019 ENOVIA VPM Training
95/190
Copyright DASSAULT SYSTEMES 2000 1-95 Menu
VPM Programmi