QuerySpaces
You can use this function to query the spaces containing a required product.
Signature
ProductOccurrence -> QuerySpaces(SpaceConceptRoot: SPP_SpaceConceptRoot,
FilterVolumeMode: Integer,
Clearance: Length,
SpacePLMType: String,
ExtensionPLMType: String,
ListOfSpaces: out List): Boolean
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 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 | 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)
}
}
}
QuerySpaceByCuboid
You can use this function to query the spaces contained in a required cuboid.
Signature
QuerySpaces(MinX: Real, MinY: Real, MinZ: Real, MaxX: Real, MaxY: Real, MaxZ: Real,
SpaceConceptRoot: SPP_SpaceConceptRoot, FilterVolumeMode: Integer, SpacePLMType: String,
ExtensionPLMType: String, ListOfSpaces: out List): Boolean
Arguments
Name |
Input / Output |
Required? |
Type |
Comment |
MinX | In | Yes | Real | X of minimum of cuboid. | MinY | In | Yes | Real | Y of minimum of cuboid. |
MinZ
|
In |
Yes
|
Real
|
Z of minimum of cuboid. |
MaxX
|
In |
Yes
|
Real
|
X of maximum of cuboid |
MaxY | In | Yes | Real | Y of maximum of cuboid | MaxZ | In | Yes | Real | Z of maximum of cuboid | SpaceConceptRoot | In | No | 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. | FilterVolumeMode | In | Yes | Integer | Mode of query:- 1 (Fully IN): Filters spaces which are fully inside the selected cuboid.
- 2 (Fully OUT): Filters spaces which are fully outside the selected cuboid.
- 3 (Partly IN): Filters spaces which are across and fully inside the selected cuboid.
- 4 (Partly OUT): Filters spaces which are across and fully outside the selected cuboid.
| SpacePLMType | In | No | String | Name of the PLMType of the space to be filtered. For example, SSM_DesignSpaceRef. | ExtensionPLMType | In | No | String | Name of the PLMType of extension to be filtered. | ListOfSpaces | Out | Yes | List | Output list of the space occurrences contained in the given cuboid based on the mode of query. |
ReturnType
Boolean
TRUE if the query is successful, FALSE if not.
Example
let minX(Real)
let minY(Real)
let minZ(Real)
let maxX(Real)
let maxY(Real)
let maxZ(Real)
let spaceConceptRoot(SPP_SpaceConceptRoot)
let filterVolumeMode(Integer)
let spaceType(String)
let extensionPLMType(String)
let listOfPLMSpaceOccurrences(List)
let result(Boolean)
let i(Integer)
let occurrenceSpaceQueryResult(PLMOccurrenceQueryResult)
let attrValue(String)
minX = -500
minY = 500
minZ = 200
maxX = 500
maxY = 1500
maxZ = 700
filterVolumeMode = 3
spaceType="SSM_DesignSpaceRef"
i = 1
result = QuerySpaces(minX,minY,minZ,maxX,maxY,maxZ,spaceConceptRoot,filterVolumeMode,spaceType,extensionPLMType,listOfPLMSpaceOccurrences)
if (result)
{
for i while i <= listOfPLMSpaceOccurrences.Size()
{
occurrenceSpaceQueryResult = listOfPLMSpaceOccurrences.GetItem(i)
if(occurrenceSpaceQueryResult <> NULL)
{
attrValue = occurrenceSpaceQueryResult.GetAttributeString("V_Name")
Message(attrValue)
}
}
}
else
Message("Failed.")
QueryObjects
You can use this function to query the products in a given space.
Signature
ProductOccurrence -> QueryObjects(RootReference: PhysicalProduct,
FilterVolumeMode: Integer,
Clearance: Length,
ObjectPLMType: String,
ListOfObjects: out List): Boolean
Arguments
Name |
Input / Output |
Required? |
Type |
Comment |
ThisSpaceOccurrence | In | Yes | ProductOccurrence | The occurrences of the space which is being intersected by some products. | RootRef | In | Yes | PhysicalProduct | It specifies the reference of the root product under which the intersecting product will be retrieved with the query.
|
filterVolumeMode
|
In |
Yes
|
Integer
|
Mode of query:- 1 (Fully IN)
- 2 (Fully OUT)
- 3 (Partly IN)
- 4 (Partly OUT).
|
clearance
|
In |
Yes
|
Length
|
It specifies the clearance distance around the input object. |
productType | In | Yes | String | Name of the product type to filter. | listOfPrdOccurences | Out | Yes | List | Output list of the product occurrences in the given space 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 productType(String)
let listOfPrdOccurences(List)
let prdOccurrence(ProductOccurrence)
let objQueryResult(PLMOccurrenceQueryResult)
let i(Integer)
let QueryResult(Boolean)
let attrValue(String)
filterVolumeMode = 3
clearance=0m
i=1
QueryResult =ThisSpaceOccurrence.QueryObjects(RootRef,
filterVolumeMode,
clearance,productType,
listOfPrdOccurences)
if(QueryResult)
{
for i while i <= listOfPrdOccurences.Size()
{
objQueryResult = listOfPrdOccurences.GetItem(i)
if(objQueryResult <> NULL)
{
attrValue= objQueryResult.GetAttributeString("PLM_ExternalID")
Message(attrValue)
}
}
}
PLMCoreReference.CreateDeclaredSpaceAssignment()
You can use this function to create assignment between a space reference and a logical reference.
Signature
PLMCoreReference.CreateDeclaredSpaceAssignment(SpaceReference : SPP_SpaceRef) : Boolean
Arguments
Name |
Input / Output |
Required? |
Type |
Comment |
SpaceReference
|
In |
Yes
|
SPP_SpaceRef |
Space reference which is to be assigned to the PLMCoreReference. |
ReturnType
Boolean
TRUE if the assignment is successful, FALSE if not.
Example
if ThisObjReference <> NULL
{
ThisObjReference.CreateDeclaredSpaceAssignment(SpaceRef)
}
PLMCoreInstance.CreateDeclaredSpaceAssignment()
You can use this function to create assignment between a space reference and a logical instance.
Signature
PLMCoreInstance.CreateDeclaredSpaceAssignment(SpaceReference : SPP_SpaceRef) : Boolean
Arguments
Name |
Input / Output |
Required? |
Type |
Comment |
SpaceReference
|
In |
Yes
|
SPP_SpaceRef |
Space reference which is to be assigned to the PLMCoreInstance. |
ReturnType
Boolean
TRUE if the assignment is successful, FALSE if not.
Example
if ThisObjInstance <> NULL
{
ThisObjInstance.CreateDeclaredSpaceAssignment(SpaceRef)
}
PLMCoreReference.RemoveDeclaredSpaceAssignment()
You can use this function to remove assignment between a space reference and a logical reference.
Signature
PLMCoreReference.RemoveDeclaredSpaceAssignment(SpaceReference : SPP_SpaceRef) : Boolean
Arguments
Name |
Input / Output |
Required? |
Type |
Comment |
SpaceReference
|
In |
Yes
|
SPP_SpaceRef
|
Space reference whose assignment needs to be removed.
|
ReturnType
Boolean
TRUE if the removal of assignment is successful, FALSE if not.
Example
if ThisObjReference <> NULL
{
ThisObjReference.RemoveDeclaredSpaceAssignment(SpaceRef)
}
PLMCoreInstance.RemoveDeclaredSpaceAssignment()
You can use this function to remove assignment between a space reference and a logical instance.
Signature
PLMCoreInstance.RemoveDeclaredSpaceAssignment(SpaceReference : SPP_SpaceRef) : Boolean
Arguments
Name |
Input / Output |
Required? |
Type |
Comment |
SpaceReference
|
In |
Yes
|
SPP_SpaceRef
|
Space reference whose assignment needs to be removed.
|
ReturnType
Boolean
TRUE if the removal of assignment is successful, FALSE if not.
Example
if ThisObjInstance <> NULL
{
ThisObjInstance.RemoveDeclaredSpaceAssignment(SpaceRef)
}
SPP_SpaceRef.GetAssignedObjects()
You can use this function to retrieve the logical components assigning the
input space reference.
Signature
SPP_SpaceRef.GetAssignedObjects(ObjectType : String, ListOfAssignedObjects : List) : Boolean
Arguments
Name |
Input / Output |
Required? |
Type |
Comment |
ObjectType
|
In |
Yes |
String |
Name of the PLM type of the reference or instance. |
ListOfAssignedObjects |
Out |
Yes |
List |
List of PLMOccurrenceQueryResult of the assigned references
or instances. |
ReturnType
Boolean
TRUE if the objects are retrieved successful, FALSE if not.
Example
let listAssignedObjects(List)
let ObjType(String)
let assignedObjQueryRes(PLMOccurrenceQueryResult)
let attrValue(String)
let i(Integer)
let result(Boolean)
ObjType="DatabaseObjectType"
i=1
result = ThisSpaceRef.GetAssignedObjects(ObjType,listAssignedObjects)
if listAssignedObjects.Size() > 0
{
for i while i <= listAssignedObjects.Size()
{
assignedObjQueryRes = listAssignedObjects.GetItem(i)
if(assignedObjQueryRes <> NULL)
{
set attrValue = assignedObjQueryRes.GetAttributeString("V_Name")
Message(attrValue)
}
}
}
PLMCoreReference.GetAssigningSpaces()
You can use this function to retrieve space references assigned to a logical reference.
Signature
PLMCoreReference.GetAssigningSpaces(SpacePLMType : String, ExtensionPLMType : String, AssigningSpaceRefs : List, FilterOnlyUnderSpaceFolder : Boolean) : Boolean
Arguments
Name |
Input / Output |
Required? |
Type |
Comment |
SpacePLMType
|
In |
Yes
|
String
|
Name of Space type to filter. For example, SSM_DesignSpaceRef or SSM_ManufacturingSpaceRef |
ExtensionPLMType | In | Yes | String | Name of extension type to filter. | AssigningSpaceRefs | Out | Yes | List | List of PLMOccurrenceQueryResult of the assigning space references. | FilterOnlyUnderSpaceFolder | In | No | Boolean | States if the result should contain only Space References instantiated under the Space Folder set in the PRM table. |
ReturnType
Boolean
TRUE if the spaces are retrieved successful, FALSE if not.
Example
let AssigningSpaces(List)
let spaceType(String)
let objReference(PLMCoreReference)
let extnType(String)
let spaceRef(SPP_SpaceRef)
let spaceRefQueryRes(PLMOccurrenceQueryResult)
let assigningSpace(DatabaseObjectType)
let i(Integer)
let result(Boolean)
let nbSpaces(Integer)
let attrValue(String)
i=1
set objReference=objOcc.Reference
spaceType="SSM_DesignSpaceRef"
Message("Name: ", objReference.Name)
result = objReference.GetAssigningSpaces(spaceType,extnType,AssigningSpaces)
/* OR result = objReference.GetAssigningSpaces(spaceType,extnType,AssigningSpaces,TRUE) */
if AssigningSpaces.Size() > 0
{
nbSpaces = AssigningSpaces.Size()
Message("Nb Spaces: ", nbSpaces)
for i while i <= AssigningSpaces.Size()
{
set spaceRefQueryRes = AssigningSpaces.GetItem(i)
if(spaceRefQueryRes <> NULL)
{
attrValue=spaceRefQueryRes.GetAttributeString("V_Name")
Message(attrValue)
set assigningSpace = spaceRefQueryRes.LoadResult(FALSE)
}
}
}
PLMCoreInstance.GetAssigningSpaces()
You can use this function to retrieve space references assigned to a logical instance.
Signature
PLMCoreInstance.GetAssigningSpaces(SpacePLMType : String, ExtensionPLMType : String, AssigningSpaceRefs : List, FilterOnlyUnderSpaceFolder : Boolean) : Boolean
Arguments
Name |
Input / Output |
Required? |
Type |
Comment |
SpacePLMType
|
In |
Yes
|
String |
Name of Space type to filter. For example, SSM_DesignSpaceRef or SSM_ManufacturingSpaceRef |
ExtensionPLMType | In | Yes | String | Name of extension type to filter. | AssigningSpaceRefs | Out | Yes | List | List of PLMOccurrenceQueryResult of the assigning space references. | FilterOnlyUnderSpaceFolder | In | No | Boolean | States if the result should contain only Space References instantiated under the Space Folder set in the PRM table. |
ReturnType
Boolean
TRUE if the spaces are retrieved successful, FALSE if not.
Example
let AssigningSpaces(List)
let spaceType(String)
let objInst(PLMCoreInstance)
let extnType(String)
let spaceRef (SPP_SpaceRef)
let spaceRefQueryRes(PLMOccurrenceQueryResult)
let assigningSpace(DatabaseObjectType)
let i(Integer)
let result(Boolean)
let nbSpaces(Integer)
let attrValue(String)
i=1
set objInst=objOcc.Instance
spaceType="SSM_DesignSpaceRef"
Message("Name: ", objInst.Name)
result = objInst.GetAssigningSpaces(spaceType,extnType,AssigningSpaces)
/* OR result = objInst.GetAssigningSpaces(spaceType,extnType,AssigningSpaces,TRUE) */
if AssigningSpaces.Size() > 0
{
nbSpaces = AssigningSpaces.Size()
Message("Nb Spaces: ", nbSpaces)
for i while i <= AssigningSpaces.Size()
{
set spaceRefQueryRes = AssigningSpaces.GetItem(i)
if(spaceRefQueryRes <> NULL)
{
attrValue=spaceRefQueryRes.GetAttributeString("V_Name")
Message(attrValue)
set assigningSpace= spaceRefQueryRes.LoadResult(FALSE)
}
}
}
IsContaining
You can use this function to check whether a given product or feature or co-ordinate intersects a given space reference or not.
Signature
ProductOccurrence -> IsContaining(Feature: Feature, Status: String):Boolean
Arguments
Name |
Input / Output |
Required? |
Type |
Comment |
space
|
In |
Yes
|
ProductOccurrence
|
It specifies the occurrences of a space reference.
|
featureObj
|
In |
Yes
|
Feature
|
It specifies the feature whose intersection with space reference is to be checked. |
string | Out | Yes | String | It checks whether the geometry intersects a space reference fully or partially, or does not intersect the space reference. |
The given ProductOccurrence must be an occurrence of a SpaceReference(SPP_SpaceRef). This is checked prior to computing the intersection status.
ReturnType
Boolean
TRUE if the geometry intersects (fully or partially) the given space reference, FALSE if it does not intersect at all.
Example
let res(boolean)
let intersectionStatus(String)
res = space.IsContaining(featureObj, intersectionStatus)
if(res)
{
Message("Intersection status: ", intersectionStatus)
}
|