You can use this function to query the spaces containing a required
product.
Signature
LogicalOccurrence -> QuerySpaces(SpaceConceptRoot: SPP_SpaceConceptRoot,
FilterVolumeMode: Integer,
Clearance: Length,
SpacePLMType: String,
ExtensionPLMType: String,
ListOfSpaces: out List): Boolean
Arguments
| Name |
Input / Output |
Required? |
Type |
Comment |
SpaceConceptRoot |
In |
Yes |
SPP_SpaceConceptRoot |
The spaces available under this space concept
root are queried. If it is NULL, the spaces available under the
space folder set in Data Setup, are queried. |
ThisObjectOccurrence |
In |
Yes |
ProductOccurrence |
The occurrences of the product which
intersects some space references. |
filterVolumeMode
|
In |
Yes |
Integer
|
Mode of query:
- 1 (Fully IN): Filters spaces which are fully inside the
selected object.(Usually, space is bigger than the
selected object. Hence, it is difficult to get a result
with this mode.)
- 2 (Fully OUT): Filters spaces which are fully outside
the selected object.
- 3 (Partly IN): Filters spaces which are across and fully
inside the selected object.
- 4 (Partly OUT): Filters spaces which are across and
fully outside the selected object.
|
clearance
|
In |
Yes |
Length |
It specifies the clearance distance around
the input object. |
spaceType |
In |
Yes |
String |
The name of the PLMType
of the space to be filtered. For example,
SSM_DesignSpaceRef. |
ExtensionPLMType |
In |
Yes |
String
|
Name of the PLMType of
extension to be filtered. |
ListOfPLMSpaceOccurences |
Out |
Yes |
List
|
Output list of the space occurrences
containing the given product based on the mode of query. |
ReturnType
Boolean
TRUE if the query is successful, FALSE if not.
Example
let filterVolumeMode(Integer)
let clearance(LENGTH)
let spaceType(String)
let ExtensionPLMType(String)
let ListOfPLMSpaceOccurences (List)
let OccurenceSpaceQueryResult(PLMOccurrenceQueryResult)
let SpaceOccurrence(ProductOccurrence)
let i(Integer)
let result(Boolean)
let spaceConceptRoot(SPP_SpaceConceptRoot)
filterVolumeMode =3
clearance=0m
i=1
result = ThisObjectOccurrence.QuerySpaces(spaceConceptRoot,
filterVolumeMode,
clearance,spaceType,
ExtensionPLMType,
ListOfPLMSpaceOccurences)
if(result)
{
for i while i <= ListOfPLMSpaceOccurences.Size()
{
OccurenceSpaceQueryResult = ListOfPLMSpaceOccurences.GetItem(i)
if(OccurenceSpaceQueryResult <> NULL)
{
attrValue=OccurenceSpaceQueryResult.GetAttributeString("PLM_ExternalID")
Message(attrValue)
}
}
}