The
ClassifyObjects method allows you to classify objects by Class, Chapter, or Catalog (only if
it contains one chapter).
Signature
ComponentFamily.ClassifyObjects(iContainerObject : PLMQueryResult, iItemsToClassify : List [, iClassifyOnlyResolvedModels : Boolean, iEmptyObjectIfPresent : Boolean, iColumnNames : List, iClassificationAttributeNames : List, iAutoMap : Boolean])
Arguments
Name |
Input/Output |
Required? |
Type |
Comment |
iContainerObject |
In |
Yes |
PLMQueryResult |
- PLMQueryResult of container object.
- Container object can be Chapter or Class.
|
iItemsToClassify |
In |
Yes |
List |
- List of items to resolve.
- This is a list of family items.
|
iClassifyOnlyResolvedModels |
In |
No |
Boolean |
- Classifies resolved models only.
- False by default.
|
iEmptyObjectIfPresent |
In |
No |
Boolean |
- Specifies to empty class/chapter if contained. objects.
- False by default.
|
iColumnNames |
In |
No |
List |
- List of characteristics column.
- For class classification: column names to be mapped with classification
attribute.
- For chapter classification: Keywords to be added on chapter.
|
iClassificationAttributeNames |
In |
No |
List |
- List of Classification Attributes to be associated to characterstic columns.
One-to-one mapping is done with iColumnNames.
- For catalog, it is ignored.
|
iAutoMap |
In |
No |
Boolean |
- Adds all the characteristic columns as keywords on chapter.
- For Class, it binds valid classification attributes with the characteristic
column.
|
Classification in Classes with Classification Attribute Mapping
//Gets the family items from family
let results(List)
let currentResult(PLMQueryResult)
let myQuery (PLMQuery)
let myFamily (ComponentFamily)
myQuery = CreatePLMQuery("CATComponentsFamilyExplicit")
myQuery->AddCriterion("V_Name","BLCOmponentFamily")
results = myQuery->RunQuery()
currentResult = results[1]
set myFamily = currentResult->LoadResult()
if(myFamily == NULL)
exit
//Gets the family items from family
let fmlItems(list)
fmlItems = myFamily.GetFamilyItems()
let fmlItemsToClassify(list)
fmlItemsToClassify.Append(fmlItems[5])
fmlItemsToClassify.Append(fmlItems[6])
//Classify only resoved models
let classifyOnlyResolvedModels(boolean)
classifyOnlyResolvedModels = False
//Empty objects if it is already presnt
let emptyObjectsIfPresent(boolean)
emptyObjectsIfPresent = False
//Classification Attributes and Design table columns list as empty.
//These lists will be taken from Business Rule
let ClassificationAtrributeName(list)
let columnNamesToMap(List)
//Get the class in which we want to classify
let classSearchresults(List)
let classPLMResult(PLMQueryResult)
let classSearchQuery (PLMQuery)
//query for search of General Class named MyClass in database
classSearchQuery = CreatePLMQuery("General Class")
classSearchQuery->AddCriterion("name","AMR17_Class")
classSearchresults = classSearchQuery->RunQuery()
if classSearchresults.Size()<>1
exit
classPLMResult = classSearchresults[1]
//ClassifyObjects inside class MyClass with classification attribute mapping
myFamily.ClassifyObjects(classPLMResult , fmlItemsToClassify, classifyOnlyResolvedModels, emptyObjectsIfPresent, columnNamesToMap, ClassificationAtrributeName, TRUE )
Classification in Chapter
//Gets the family items from family
let fmlItems(list)
fmlItems = myFamily.GetFamilyItems()
let fmlItemsToClassify(list)
fmlItemsToClassify.Append(fmlItems[5])
fmlItemsToClassify.Append(fmlItems[6])
//Get the Chapter in which we want to classify
let chapterSearchresults(List)
let chapterPLMResult(PLMQueryResult)
let chapterSearchQuery (PLMQuery)
//query for search of chapter MyChapter
chapterSearchQuery = CreatePLMQuery("ENOCLG_ClassReference")
chapterSearchQuery->AddCriterion("PLM_ExternalID","MyChapter")
chapterSearchresults = chapterSearchQuery->RunQuery()
if chapterSearchresults.Size()<>1
exit
chapterPLMResult = chapterSearchresults[1]
//ClassifyObjects inside chapter
myFamily.ClassifyObjects(chapterPLMResult , fmlItemsToClassify )