Context Object Parameters
Parameter Name | Type | Read/Write | Comments |
---|
V_discipline | String |
Read | The V_discipline gives the discipline type of that particular type. |
Sharable String | String | Write | The Sharable can be 3DPart or NonShared that determines the behavior of the object type being created in 3DEXPERIENCE. |
Sample 1
The following Product Structure applies to all three CATRule samples.
The following is a CATRule file that applies to both the PV and CATPart and CATDrawing representations. As soon as we have such a CATRuleExit available in runtime, the specified CATRule file (VP5_Sample_Sharable in this example) will be read to understand the user-specified choice.
Let SourceObject(PLMEntity)
Let Sharable(String)
Sharable = "FALSE"
set SourceObject = Parameters->GetAttributeObject("SourceObject")
/* Sharable="3DPart" */
Sharable="NonShared"
Parameters->SetAttributeString("Sharable", Sharable)
}
In the above CATRule file, you can specify the value of Sharable to either "NonShared" or "3DPart", as per the above CATRule file (Sharable=="NonShared"):
- All representations (With CATPart or CATDrawing streams) should be imported as NonShared.
- All references should be imported as simple references.
Results after import into 3DEXPERIENCE will be:
- All Product1PRC, Product2, Part1 and Part2 references will be imported as simple references.
- Part1Doc and Part2Doc will be imported as a NonShared representation (provided that these are not multi-instantiated EV5 Docs).
- Drawing2Doc will be imported as a NonShared representation (provided that this rep is not a multi-instantiated rep).
Sample 2
The following is a CATRule file that has some customization behavior so that you force / specify that a CATDrawing representation is always imported as Shared.
Let SourceObject(PLMEntity)
Let Sharable(String)
Sharable = "FALSE"
set SourceObject = Parameters->GetAttributeObject("SourceObject")
Sharable="3DPart"
/*Sharable="NonShared"*/
Let srcObject_VDisc(String)
if(SourceObject->IsSupporting("VP5DocumentRepReference") == true
or SourceObject->IsSupporting("VP5Drawing") == true )
{
srcObject_VDisc = SourceObject->GetAttributeString("V_discipline")
if(srcObject_VDisc=="Drafting")
{
Sharable="FALSE"
}
In the above CATRule file, you can specify the value of Sharable to be either "NonShared" or "3DPart", as per the above rule file (Sharable=="NonShared"). Later we have a condition (satisfied by a CATDrawing representation only) which sets Sharable to FALSE for this object:
- All representations (with CATDrawing streams) should be imported as Shared.
- All representations (with CATPart streams) should be imported as NonShared.
- All references should be imported as simple references.
Results after import into 3DEXPERIENCE will be:
- All reference Product1PRC, Product2, Part1 and Part2 will be imported as a simple References.
- Part1Doc and Part2Doc will be imported as a NonShared representation (provided that these are not multi-instantiated EV5 Docs).
- Drawing2Doc will be imported as a Shared representation.
Sample 3
The following is a CATRule file where user had specified value of Sharable as 3DPart, without testing V_discipline then it will be treated with the default behavior of drawing, Unshared.
Let SourceObject(PLMEntity)
Let Sharable(String)
Sharable = "FALSE"
set SourceObject = Parameters->GetAttributeObject("SourceObject")
Sharable="3DPart"
/* Sharable="NonShared" */
Let srcObject_VDisc(String)
Parameters->SetAttributeString("Sharable", Sharable)
}
In the above Rule file, you can specify the value of Sharable to be either "NonShared" or "3DPart". As per above Rule file (Sharable=="3DPart"). Later we didn’t add any condition (to be satisfied by a CATDrawing representation only) which can set Sharable to FALSE for this object:
- All representations With CATDrawing streams should be imported as UnShared
- All representations (With CATPart streams) should be imported as Shared
- All references should be imported as Shared(Provided that these are not multi-instantiated EV5 Docs)
Results after import into 3DEXPERIENCE will be:
- All Product1PRC, Product2 references will be imported as simple references.
- Part1, Part2 will be imported as 3DPart references (provided that these are not multi-instantiated EV5 docs).
- Part1Doc and Part2Doc will be imported as Unshared 3DPart representations (provided that these are not multi-instantiated EV5 docs).
- Drawing2Doc will be imported as an Unshared representation.