3D Shape Methods

Note: To view an example, import the 2016x EKL Enhancements.3dxml file located in win_b64\startup\Knowledgeware\Sample1 in the installation folder.

This page discusses:

GeometricFeature.GetNearSubElements()

The function is used to return the subelements of a feature that are the nearest to a point, curve, or surface. Those points, curves, or surfaces can be anywhere in the model. They are not the required part of the feature whose subelements you are looking for.

Signature

GeometricFeature.GetNearSubElements(dimension : Integer, geoFeature : GeometricFeature) : List

Arguments

Name Input / Output Required? Type Comment
dimension In Yes Integer
geoFeature In Yes GeometricFeature

ReturnType

List

Example

let subElements (List)
let pad (GeometricFeature)
let nearToFeature (GeometricFeature)

set pad=PartBody\Pad.1

set nearToFeature = PartBody\Point.1
subElements = pad->GetNearSubElements(1, nearToFeature) /* nearest edges of a pad to a point */

set nearToFeature = PartBody\Line.1
subElements = pad->GetNearSubElements(2, nearToFeature) /* nearest pad faces to a line */

set nearToFeature = PartBody\Plane.1
subElements = pad->GetNearSubElements(0, nearToFeature) /* nearest vertexes of a pad to a plane */

GeometricFeature.GetSubElements()

Function used to return subelements of a feature. An integer argument specifies the type that you want:

  • Vertex (0)
  • Edge (1)
  • Face (2).

Signature

GeometricFeature.GetSubElements(dimension : Integer) : List

Arguments

Name Input / Output Required? Type Comment
dimension In Yes Integer

ReturnType

List

Example

let subElements (List)
subElements = PartBody\Pad.1.GetSubElements(0)
subElements = PartBody\Pad.1.GetSubElements(1)
subElements = PartBody\Pad.1GetSubElements(2)

GeometricFeature.ListParents()

Signature

GeometricFeature.ListParents() : List

ReturnType

List

Example

let parents (List)
parents = PartBody\Pad.1.ListParents()

PartFeature.GetPowerCopyReferenceList()

Signature

PartFeature.GetPowerCopyReferenceList() : List

ReturnType

List

Example


let List1(List)
let List2(List)

List1=myPartFeat.GetPowerCopyReferenceList()
List2= myPartFeat.GetUDFReferenceList()
Message("Size of List1  ", List1.Size())

let pc1(PowerCopy)
set pc1 = List1[1]
Message(" PowerCopy name first index = #", pc1.Name)

PartFeature.GetUDFReferenceList ()

Signature

PartFeature.GetUDFReferenceList() : List

ReturnType

List

Example


let List1(List)
let List2(List)

List1=myPartFeat.GetPowerCopyReferenceList()
List2= myPartFeat.GetUDFReferenceList()
Message("Size of List1  ", List1.Size())

let myUDF(UserFeature)
set myUDF = List2[1]
Message("UDF at first index is: #",myUDF.Name)

VPMRepReference.GetPartFeatureFromRepresentation ()

Signature

VPMRepReference.GetPartFeatureFromRepresentation()

Example


let myQuery(PLMQuery)
myQuery = CreatePLMQuery( "VPMReference" )
myQuery.AddCriterion( "V_Name", "Test_Part" )

let queryList (List)
queryList = myQuery.RunQuery()

let queryResult (PLMQueryResult)

if (queryList.Size() > 0)
{
	queryResult = queryList[1]
}
else
	Message(" queryList is  NULL ")

let myPart (VPMReference)
set myPart = queryResult.LoadResult()

let ChildrenList(list)
let ListOfInst (list)
ChildrenList=myPart.Children
//find all instances in this list
ListOfInst=ChildrenList.Filter("VPMRepInstance","true")
//display number of instances
Notify ("there are # instances below root product",ListOfInst.Size())
Message("Size of ChildrenList  ", ChildrenList.Size())

let inst(VPMRepInstance)
if (ListOfInst.Size() > 0)
{
	inst = ListOfInst[1]
}

let rep (VPMRepReference)
set rep = inst.Reference
if rep <> NULL
{
	Message(" rep name is   =  # ", rep.Name )
}
else
	Message(" rep is  NULL ")


let myList(List)
if myPart <> NULL
{
	Message(" myPart name is   =  # ", myPart.Name )
}
else
	Message(" myPart is  NULL ")

let myPartFeat(PartFeature)
if rep<> NULL
{
	
	myPartFeat = rep->GetPartFeatureFromRepresentation()
}
else
	Message(" rep is  NULL ")

GetPartFeature ()

Signature

GetPartFeature(iFeature: Feature) : Mechanical Part

Arguments

Name Input / Output Required? Type Comment
Feature In Yes feature Retrieves the mechanical part under which the feature is located.

Example

let FeatureInput(Feature)
set FeatureInput = PartBody
let oMechanicalPart(`Mechanical Part`)

oMechanicalPart = GetPartFeature(FeatureInput)
Message("Name of Mechanical Part", oMechanicalPart.Name)