All Categories Class Hierarchy This Category Indexes
MML_links Class CATLnkAPI
CATLnkAPI
public class CATLnkAPI
Usage Notes:
This class allows you to manage MML Links.
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
Method Index
- o
ComputeRelationEnvironments(int,int)
- Computes the list of all environments containing MML link tables.
- o
DeleteEntities(ObjID&)
- This function deletes from the database all MML_ENTITY entities related
to the given Object (representing a model).
- o
DeleteLinks(ObjID&)
- This function deletes from the database all MML_LINK links related
to the given Object (representing a model).
- o
GetEntityCount(ObjID&)
- Send back the number of MML entities associated to the given object.
- o
GetImpactedBy(ObjID&,int&,int)
- Return the list of objects impacted by a given one.
- o
GetImpactingOn(ObjID&,int&)
- Return the list of objects impacting on a given one.
- o
GetLinksBetween(ObjID&,ObjID&,CATListOfCATUnicodeString&,CATListOfInt&,int)
- Return MML links between two objects.
- o
GetV5Impacts(ObjID&,int&,int&)
- Return the list of objects linked by CATIA V5 links to a given one.
- o
GetV5Impacts(ObjID&,int,ObjID&,int,double*,int&,ObjID*&,CATUnicodeString*&)
- Return the list of objects linked by CATIA V5 links to a given one
in a given context.
- o
IsPointedModel(ObjID&)
- Checks if this model is pointed by other ones (if it impacts on
other one).
- o
IsPointedPart(ObjID&,CATUnicodeString&)
- This function checks if this part contains models pointed by other ones.
- o
IsV5Impacting(ObjID&)
- Return if an object impacts another object in CATIA V5
Methods
o ComputeRelationEnvironments
| public static CATListOfCATUnicodeString ComputeRelationEnvironments( | int | iRelationType, |
| int | iWithFilter | =0) |
-
Computes the list of all environments containing MML link tables.
According to the parameter, sends back environments for $EXT or
MML_LINK tables.
This function is the one used in the internal VPM code.
- Parameters:
-
- iRelationType
- either MML_LINK_EXT or MML_LINK_ENTITY or MML_LINK_BOTH
- iWithFilter
- by default no filter, otherwise filter by settings
- Returns:
- the environment list
o DeleteEntities
| public static void DeleteEntities( | const ObjID& | iInst) |
-
This function deletes from the database all MML_ENTITY entities related
to the given Object (representing a model).
This function is the one used in the internal VPM code to delete
entities belonging to a model on its deletion.
- Parameters:
-
- iInst
- Object on which to delete entities.
o DeleteLinks
| public static void DeleteLinks( | const ObjID& | iInst) |
-
This function deletes from the database all MML_LINK links related
to the given Object (representing a model).
This function is the one used in the internal VPM code to delete
links belonging to a model on its deletion.
- Parameters:
-
- iInst
- Object on which to delete links.
o GetEntityCount
| public static int GetEntityCount( | const ObjID& | iInst) |
-
Send back the number of MML entities associated to the given object.
This function is the one used in the internal VPM code to provide
information about the number of entities.
- Parameters:
-
- iInst
- Objects we want to know the number of entities of.
- Returns:
- Number of entities. Can be zero.
o GetImpactedBy
| public static ObjID * GetImpactedBy( | const ObjID& | iInst, |
| int& | oCount, |
| int | iLost | = 0) |
-
Return the list of objects impacted by a given one.
- Parameters:
-
- iInst
- Input object (impacting one).
- oCount
- Output count of objects sent back.
- Returns:
- Pointer to an array of the impacted objects. This array contains
oCount objects and should be freed by the caller.
o GetImpactingOn
| public static ObjID * GetImpactingOn( | const ObjID& | iInst, |
| int& | oCount) |
-
Return the list of objects impacting on a given one.
- Parameters:
-
- iInst
- Input object (impacted one).
- oCount
- Output count of objects sent back.
- Returns:
- Pointer to an array of the impacting objects. This array contains
oCount objects and should be freed by the caller.
o GetLinksBetween
| public static int GetLinksBetween( | const ObjID& | iImpacted, |
| const ObjID& | iImpacting, |
| CATListOfCATUnicodeString& | oLinkTypes, |
| CATListOfInt& | oLinkInfos, |
| int | iMode | = MML_MODE_FULL) |
-
Return MML links between two objects.
- Parameters:
-
- iImpacted
- ObjID of the impacted object.
- iImpacting
- ObjID of the impacting model.
- oLinkTypes
- List of link types between those models.
- oLinkInfo
- List of informations flag related to the links.
BIT b0, flag MML_BITMASK_SYNCHRO :
0 the link is not synchronised.
1 the link is synchronized.
BIT b1, flag MML_BITMASK_TYPE (VPM1.2 and above only) :
0 the link is of type object-to-object ($EXT)
1 the link is of type element-to-element (MML_LINK)
- iMode
- Mode of the returned information, either :
MML_MODE_FULL get all e2e and m2m links individualy
MML_MODE_DISPLAY get links the way they would be displayed in the
MML graph (MML_BITMASK_TYPE is then useless)
MML_MODE_SYNTHESIS get only one synthetic link, only MML_BITMASK_SYNCHRO
conveys information (oLinkTypes is senseless)
- Returns:
- Error status.
o GetV5Impacts
| public static ObjID * GetV5Impacts( | const ObjID& | iInst, |
| int& | iImpact, |
| int& | oCount) |
-
Return the list of objects linked by CATIA V5 links to a given one.
Only reference objects can be retrieved (no instance objects)
- Parameters:
-
- iInst
- Input object (reference one).
- iImpact
- Type of the asked impact, either :
MMLV5_IMPACTED_BY get the impacted reference objects
MMLV5_IMPACTED_ON get the impacting on reference objects
- oCount
- Output count of objects sent back.
- Returns:
- Pointer to an array of the linked objects, according the impact type.
This array contains oCount objects and should be freed by the caller.
o GetV5Impacts
| public static void GetV5Impacts( | const ObjID& | iInst, |
| int | iImpact, |
| const ObjID& | iCtxRoot, |
| int | iNbLinks, |
| const double* | adCLinks, |
| int& | oCount, |
| ObjID*& | oImpacts, |
| CATUnicodeString*& | oType) |
-
Return the list of objects linked by CATIA V5 links to a given one
in a given context.
- Parameters:
-
- iInst
- Input object.
- iImpact
- Type of the asked impact, either :
- MMLV5_IMPACTED_BY get the impacted reference objects,
- MMLV5_IMPACTED_ON get the impacting on reference objects.
- iCtxRoot
- Assembly context root.
- iNbLinks
- Number of links in assembly context path.
- adCLinks
- Assembly context path (links COMPID).
- oCount
- Output count of objects sent back.
- oImpacts
- Objects sent back.
- oType
- Impact type.
o IsPointedModel
| public static int IsPointedModel( | const ObjID& | iInst) |
-
Checks if this model is pointed by other ones (if it impacts on
other one). Checks both $EXT and MML_LINK.
This function is the one used in the internal VPM code to check
links on a model before deletion.
- Parameters:
-
- iInst
- Object on which to check MML links.
- Returns:
- 1 if the model is pointed or zero if not.
o IsPointedPart
| public static int IsPointedPart( | const ObjID& | iInst, |
| CATUnicodeString& | oNames) |
-
This function checks if this part contains models pointed by other ones.
Checks both $EXT and MML_LINK.
This function is the one used in the internal VPM code to check
links on a part before deletion.
- Parameters:
-
- iInst
- Object of the part on the models of which we want to check MML links.
- oNameList
- On succes (return 1), contains an array of CATUnicodeString, being the
name of the pointed models. This array has to be deleted by the caller.
It is used for display purpose only.
- Returns:
- 1 if this part contains pointed models or zero if not.
o IsV5Impacting
| public static int IsV5Impacting( | const ObjID& | iInst) |
-
Return if an object impacts another object in CATIA V5
- Parameters:
-
- iInst
- Input object (reference one).
- Returns:
- 1 if this part impacts another object or zero if not.
This object is included in the file: CATLnkAPI.h
If needed, your Imakefile.mk should include the module: VX0MMODL