Create Template
You can create templates using MQL.
-
Login to MQL as a Leader.
set context user creator;set context user user1 password user1 role "ctx::VPLMProjectLeader.Company Name.Default"; -
You can use following format to create a template. For CAD data,
add bus <TEMPLATE_OBJECT_TYPE> <TEMPLATE_OBJECT_NAME> <TEMPLATE_OBJECT_REVISION> policy < TEMPLATE_OBJECT_POLICY> vault <VAULT_NAME>;For example,
add bus "CATPart Template" PartTemplate --- policy "Design TEAM Resource" vault "eService Production";- <TEMPLATE_OBJECT_TYPE>: Denotes the object type based on the active tab when you start this procedure.
- <TEMPLATE_OBJECT_NAME>: Denotes the name of the template.
- <TEMPLATE_OBJECT_REVISION>: Denotes the revision level to assign to the CAD object when it is created from the template.
- <VAULT_NAME>: Denotes the location where the template will be saved.
- < TEMPLATE_OBJECT_POLICY>: Denotes the object policy type.
-
For Family Instance like CAD data, add Instance template along with Family
template.
add bus <FAM_TEMPLATE_OBJ_TYPE> <FAM_TEMPLATE_OBJ_NAME> <FAM_TEMPLATE_OBJ_REVISION> policy <TEMPLATE_OBJECT_POLICY> vault <VAULT_NAME> Title <TITLE_VALUE_FAM>;For example,
add bus “SW Component Family Template” “FamilyTemplate” --- policy “Design TEAM Definition” vault “eService Production” Title “SLWCAD.SLDPRT”add bus <INST_TEMPLATE_OBJ_TYPE> <INST_TEMPLATE_OBJ_NAME> <INST_TEMPLATE_OBJ_REVISION> policy <TEMPLATE_OBJECT_POLICY> vault <VAULT_NAME> Title <TITLE_VALUE_INST>;For example,
add bus “SW Component Instance Template” “InstanceTemplate” --- policy “Design TEAM Definition” vault “eService Production” Title “InstanceName(SLWCAD)”- <FAM_TEMPLATE_OBJ_TYPE>: Denotes the family object type based on the active tab when you start this procedure.
- <INST_TEMPLATE_OBJ_TYPE>: Denotes the Instance object type based on the active tab when you start this procedure.
- <TITLE_VALUE_FAM>: Denotes the family object Title with or without extension.
- <TITLE_VALUE_INST> : Denotes the Instance Object Title as “InstanceTitle(TITLE_VALUE_FAM)” where TITLE_VALUE_FAM is without extension.
connect bus <FAM_TEMPLATE_OBJ_TYPE> <FAM_TEMPLATE_OBJ_NAME> <FAM_TEMPLATE_OBJ_REVISION> relationship "Instance Of" to <INST_TEMPLATE_OBJ_TYPE> <INST_TEMPLATE_OBJ_NAME> <INST_TEMPLATE_OBJ_REVISION>;For example,
connect bus "SW Component Family Template" FamilyTemplate --- rel "Instance Of" to "SW Component Instance Template" InstanceTemplate ---;