PRODUCT_Types (no NLS) Methods

This page discusses:

ProductOccurrence.IsContaining()

This method checks whether the given geometry intersects the space.

Signature

ProductOccurrence.IsContaining(Feature : Feature, Status : String) : Boolean

Arguments

Name Input/Output Required? Type Comment
Feature In Yes Feature The geometry to check if it intersects the input SpaceReference.
Status Out Yes String Describes whether the geometry intersects the given SpaceReference fully, partially or not at all.

ReturnType

Boolean

TRUE if the geometry intersects fully or partially the given SpaceReference, FALSE if it does not intersects it at all.

Example

/* SpaceOccurrence is the ProductOccurrence of a space object, feature is Feature object */
 
let result(boolean)
let Status(String)
 
result=SpaceOccurrence.IsContaining(feature, Status)
if(result)
	Message("Intersection Status: ", Status)

ProductOccurrence.QueryObjects()

This method retrieves the objects that are intersecting a given space based on 3D index search.

Signature

ProductOccurrence.QueryObjects(RootReference : PLMCoreReference, FilterVolumeMode : Integer, Clearance : LENGTH, ProductType : String, ListOfObjects : List) : Boolean

Arguments

Name Input/Output Required? Type Comment
RootReference In Yes PLMCoreReference Physical root reference of the product under which the products are to be queried.
FilterVolumeMode In Yes Integer Filter volume mode. Valid inputs for this argument are:
  • Fully IN
  • Fully OUT
  • Partly IN
  • Partly OUT
Clearance In Yes LENGTH Clearance distance to be considered in the query.
ProductType In Yes String Name of the product type to filter.
ListOfObjects Out Yes List List of PLMOccurenceQueryResult of the objects as obtained from the query.

ReturnType

Boolean

TRUE if the query is successful, FALSE if the query fails.

Example

/*
SpaceOccurrence(ProductOccurrence) : input occurrence of the Space
RootRef(PLMCoreReference) : Input root reference to consider as root
*/
 
/* Mode of query */
let filterVolumeMode (Integer)
 
/* Clearance to consider in the query */
	let clearance(LENGTH)
	 
/* Product type to filter */
let productType(String)
 
/* Output list of product occurrences of the objects that are intersecting the given space */
let listOfPrdOccurences(List)
 
/* Result of the query */
let QueryResult(Boolean)
let i(Integer)
 
Let prdOccurrence(ProductOccurrence)
 
/* just to hold the individual query result from the output list */ 
let objQueryResult(PLMOccurrenceQueryResult)
let i(Integer)
filterVolumeMode = 3
clearance=1.5m
i=1
 
/* Query for the objects. “SpaceOccurrence” is the input occurrence of the space that is being intersected by some products. “RootRef” is the root product reference under which the intersecting products are to be retrieved */ 
QueryResult = SpaceOccurrence.QueryObjects(RootRef,
                                           filterVolumeMode,
                                           clearance,
                                           productType,
                                           listOfPrdOccurences) 
 
if(QueryResult)
{
    for i while i <= listOfPrdOccurences.Size()
    {
        objQueryResult = listOfPrdOccurences.GetItem(i)
        if(objQueryResult <> NULL)
        {
            objQueryResult->LoadResult(FALSE)
            set prdOccurrence= objQueryResult.LoadedOccurrence            
        } 
    }
} 

ProductOccurrence.QuerySpaces()

This method retrieves the ship spaces that are intersected by a given product occurrence based on 3D index search.

Signature

ProductOccurrence.QuerySpaces(SpaceConceptRoot : SPP_SpaceConceptRoot, FilterVolumeMode : Integer, Clearance : LENGTH, SpacePLMType : String, ExtensionPLMType : String, ListOfSpaces : List) : Boolean

Arguments

Name Input/Output Required? Type Comment
SpaceConceptRoot In Yes SPP_SpaceConceptRoot The spaces under this Space Concept Root are queried. If this argument is set to NULL, the spaces under the Space Folder are queried.
FilterVolumeMode In Yes Integer Filter volume mode. Valid inputs for this argument are:
  • Fully IN
  • Fully OUT
  • Partly IN
  • Partly OUT
Clearance In Yes LENGTH Clearance distance around the input object to consider in the query.
SpacePLMType In Yes String Name of the PLMType of the space to get in the result (for instance, SSM_DesignSpaceRef).
ExtensionPLMType In Yes String Name of the extension type to filter.
ListOfSpaces Out Yes List List of the PLMOccurenceQueryResult of the spaces as obtained from the query.

ReturnType

Boolean

TRUE if the query is successful, FALSE if the query fails.

Example

/*
ObjectOccurrence(ProductOccurrence) : input occurrence of the product
*/
	 
/* Mode of query */
let filterVolumeMode(Integer)
 
/* Clearance to consider in the query */
let clearance(LENGTH)
	 
/* Space type to filter */
let spaceType(String)
 
/* Extension type to filter */
let ExtensionPLMType(String)
 
/* Output list of product occurrences of the spaces that are intersected by the given object */
let ListOfPLMSpaceOccurences (List)
	 
/* just to hold the individual PLMOccurenceQueryResult of spaces from the output list */ 
let OccurenceSpaceQueryResult(PLMOccurrenceQueryResult)
let i(Integer)
	 
/* Result of the query*/ 
let result(Boolean)
	 
Let SpaceOccurrence(ProductOccurrence)
	 
/* Set QueryMode as Partly In(3) */ 
filterVolumeMode =3
	i=1
 
/* Query for Spaces. “ObjectOccurrence” is the input product occurrence that intersects some space references */
/* Space Folder which is set in Space Allocation Resource Set of Data Setup is considered as Root */ 
result = ObjectOccurrence.QuerySpaces(filterVolumeMode,
                                      clearance,
	                             							 spaceType,
                                      ExtensionPLMType, 
                                      ListOfPLMSpaceOccurences) 
if(result)
{
    for i while i <= ListOfPLMSpaceOccurences.Size()
    {
        OccurenceSpaceQueryResult = ListOfPLMSpaceOccurences.GetItem(i)
        if(OccurenceSpaceQueryResult <> NULL)
        {          
            OccurenceSpaceQueryResult->LoadResult(FALSE)
            set SpaceOccurrence = OccurenceSpaceQueryResult.LoadedOccurrence
        } 
    }
}