HVAC Physical Functions

This page discusses:

HVAC_DuctXPort.CheckCompatibility()

Signature

HVAC_DuctXPort.CheckCompatibility(Port Owner Occurrence : ProductOccurrence, Second Port : VPMPort, Second Port Owner Occurrence : ProductOccurrence, Use Only Compatibility Rule Table : Boolean, List of Additional Specifications : List, Parameters whose check failed : List) : Integer

Arguments

Name Input/Output Required? Type Comment
Port Owner Occurrence In ProductOccurrence -
Second Port In VPMPort -
Second Port Owner Occurrence In ProductOccurrence -
Use Only Compatibility Rule Table In Boolean -
List of Additional Specifications In List -
Parameters whose check failed Out List -

ReturnType

Integer

HVAC_DuctXPort.SetPortAttributeString()

Signature

HVAC_DuctXPort.SetPortAttributeString(AttrName : String, AttrValue : String)

Arguments

Name Input/Output Required? Type Comment
AttrName In String -
AttrValue In String -

HVAC_Flexible_Duct.GetColor()

Lets you retrieve the color of the flexible duct from the geometrical feature.

Signature

HVAC_Flexible_Duct.GetColor(oRed : Integer, oGreen : Integer, oBlue : Integer)

Arguments

Name Input/Output Required? Type Comment
oRed Out Integer Value between 0 and 255
oGreen Out Integer Value between 0 and 255
oBlue Out Integer Value between 0 and 255

Example

let Red(Integer)
let Green(Integer)
let Blue(Integer)
Red = 120
Green =180
Blue = 255
let R(Integer)
let G(Integer)
let B(Integer)

Message("SetColor Called")

prd.SetColor(Red, Green, Blue)

Message("GetColor Called")

prd.GetColor(R, G, B)

if(  ( Red == R) and (Green == G) and  ( Blue == B) )
{
	Message("color set and get are equal ")
	Message("color set ", Red ,Green , Blue)
	Message("colorGet" ,R ,G , B)	
}
else
{
	Message("set color is different from get color  ")
}

HVAC_Flexible_Duct.GetOpacity()

Signature

HVAC_Flexible_Duct.GetOpacity(oOpacity : Integer)

Arguments

Name Input/Output Required? Type Comment
oOpacity Out Integer -

HVAC_Flexible_Duct.SetColor()

Lets you set the color on the flexible duct from the geometrical feature.

Signature

HVAC_Flexible_Duct.SetColor(iRed : Integer, iGreen : Integer, iBlue : Integer)

Arguments

Name Input/Output Required? Type Comment
iRed In Integer Value between 0 and 255
iGreen In Integer Value between 0 and 255
iBlue In Integer Value between 0 and 255

Example

let Red(Integer)
let Green(Integer)
let Blue(Integer)
Red = 120
Green =180
Blue = 255
let R(Integer)
let G(Integer)
let B(Integer)

Message("SetColor Called")

prd.SetColor(Red, Green, Blue)

Message("GetColor Called")

prd.GetColor(R, G, B)

if(  ( Red == R) and (Green == G) and  ( Blue == B) )
{
	Message("color set and get are equal ")
	Message("color set ", Red ,Green , Blue)
	Message("colorGet" ,R ,G , B)	
}
else
{
	Message("set color is different from get color  ")
}

HVAC_Flexible_Duct.SetOpacity()

Signature

HVAC_Flexible_Duct.SetOpacity(iOpacity : Integer)

Arguments

Name Input/Output Required? Type Comment
iOpacity In Integer -

HVAC_Insulation.GetColor()

Lets you retrieve the color of the insulation from the geometrical feature.

Signature

HVAC_Insulation.GetColor(oRed : Integer, oGreen : Integer, oBlue : Integer)

Arguments

Name Input/Output Required? Type Comment
oRed Out Integer Value between 0 and 255
oGreen Out Integer Value between 0 and 255
oBlue Out Integer Value between 0 and 255

Example

let Red(Integer)
let Green(Integer)
let Blue(Integer)
Red = 120
Green =180
Blue = 255
let R(Integer)
let G(Integer)
let B(Integer)

Message("SetColor Called")

prd.SetColor(Red, Green, Blue)

Message("GetColor Called")

prd.GetColor(R, G, B)

if(  ( Red == R) and (Green == G) and  ( Blue == B) )
{
	Message("color set and get are equal ")
	Message("color set ", Red ,Green , Blue)
	Message("colorGet" ,R ,G , B)	
}
else
{
	Message("set color is different from get color  ")
}

HVAC_Insulation.GetOpacity()

Signature

HVAC_Insulation.GetOpacity(oOpacity : Integer)

Arguments

Name Input/Output Required? Type Comment
oOpacity Out Integer -

HVAC_Insulation.SetColor()

Lets you set the color of the insulation on the geometrical feature.

Signature

HVAC_Insulation.SetColor(iRed : Integer, iGreen : Integer, iBlue : Integer)

Arguments

Name Input/Output Required? Type Comment
iRed In Integer Value between 0 and 255
iGreen In Integer Value between 0 and 255
iBlue In Integer Value between 0 and 255

Example

let Red(Integer)
let Green(Integer)
let Blue(Integer)
Red = 120
Green =180
Blue = 255
let R(Integer)
let G(Integer)
let B(Integer)

Message("SetColor Called")

prd.SetColor(Red, Green, Blue)

Message("GetColor Called")

prd.GetColor(R, G, B)

if(  ( Red == R) and (Green == G) and  ( Blue == B) )
{
	Message("color set and get are equal ")
	Message("color set ", Red ,Green , Blue)
	Message("colorGet" ,R ,G , B)	
}
else
{
	Message("set color is different from get color  ")
}

HVAC_Insulation.SetOpacity()

Signature

HVAC_Insulation.SetOpacity(iOpacity : Integer)

Arguments

Name Input/Output Required? Type Comment
iOpacity In Integer -

HVAC_Part.CreateHvacPort()

Lets you create HVAC ports.

Signature

HVAC_Part.CreateHvacPort(X_OriginPt : Real, Y_OriginPt : Real, Z_OriginPt : Real, X_AlignDir : Real, Y_AlignDir : Real, Z_AlignDir : Real, X_OrientDir : Real, Y_OrientDir : Real, Z_OrientDir : Real, PortType : HvacPort_Types, PortName : String, X_OffsetPoint : Real [, Y_OffsetPoint : Real, Z_OffsetPoint : Real]) : HVAC_PartPort

Arguments

Name Input/Output Required? Type Comment
X_OriginPt In Real Defines the center point of the port: X coordinate
Y_OriginPt In Real Defines the center point of the port: Y coordinate
Z_OriginPt In Real Defines the center point of the port: Z coordinate
X_AlignDir In Real Defines the alignment direction: X coordinate
Y_AlignDir In Real Defines the alignment direction: Y coordinate
Z_AlignDir In Real Defines the alignment direction: Z coordinate
X_OrientDir In Real Defines the orientation direction: X coordinate
Y_OrientDir In Real Defines the orientation direction: Y coordinate
Z_OrientDir In Real Defines the orientation direction: Z coordinate
PortType In HvacPort_Types Defines the type of the port from the predefined list in HVACPort_Types
PortName In String Defines the name of the port
X_OffsetPoint In No Real If the port type is two points part or hole port, you must define the offset from the center of the port
Y_OffsetPoint In No Real -
Z_OffsetPoint In No Real -

ReturnType

HVAC_PartPort

Example

/*To create a two point hole port on hvac part*/

prd is Hvac_Part 

let X_OPt(Real)
let Y_OPt(Real)
let Z_OPt(Real)
X_OPt=0
Y_OPt=0
Z_OPt=0
 
let X_alignDir(Real)
let Y_alignDir(Real)
let Z_alignDir(Real)
X_alignDir=0
Y_alignDir=0
Z_alignDir=2
 
let X_orientDir(Real)
let Y_orientDir(Real)
let Z_orientDir(Real)
X_orientDir=0
Y_orientDir=2
Z_orientDir=0

let X_offsetpt(Real)
let Y_offsetpt(Real)
let Z_offsetpt(Real)
X_offsetpt=2
Y_offsetpt=0
Z_offsetpt=0
 
let porttype(HvacPort_Types)
porttype= "CATHva2HolePort"

let portName(String)
portName = "test1"
 
let port(Hvac_Port)
 
Message("CreateHvacPortCalled")
 
port = prd. CreateHvacPort(X_OPt, Y_OPt, Z_OPt, X_alignDir, Y_alignDir, Z_alignDir, X_orientDir, Y_orientDir, Z_orientDir, porttype,
portName, X_offsetpt,Y_offsetpt,Z_offsetpt)

HVAC_Port.CheckCompatibility()

Signature

HVAC_Port.CheckCompatibility(Port Owner Occurrence : ProductOccurrence, Second Port : VPMPort, Second Port Owner Occurrence : ProductOccurrence, Use Only Compatibility Rule Table : Boolean, List of Additional Specifications : List, Parameters whose check failed : List) : Integer

Arguments

Name Input/Output Required? Type Comment
Port Owner Occurrence In ProductOccurrence -
Second Port In VPMPort -
Second Port Owner Occurrence In ProductOccurrence -
Use Only Compatibility Rule Table In Boolean -
List of Additional Specifications In List -
Parameters whose check failed Out List -

ReturnType

Integer

HVAC_Port.SetPortAttributeReal()

Lets you modify the port attribute when its type is real.

Signature

HVAC_Port.SetPortAttributeReal(AttrName : String, AttrValue : Real)

Arguments

Name Input/Output Required? Type Comment
AttrName In String Name of the attribute you want to modify
AttrValue In Real New value you want to set on this attribute

HVAC_Port.SetPortAttributeString()

Lets you modify the port attribute when its type is string.

Signature

HVAC_Port.SetPortAttributeString(AttrName : String, AttrValue : String)

Arguments

Name Input/Output Required? Type Comment
AttrName In String Name of the attribute you want to modify
AttrValue In String New value you want to set on this attribute

HVAC_Rigid_Duct.Add3DPoint()

Lets you add a list of points.

Signature

HVAC_Rigid_Duct.Add3DPoint(iListPoint : List, iIndex : Integer) : Integer

Arguments

Name Input/Output Required? Type Comment
iListPoint In List List of the GSM point coordinates
iIndex In Integer Points are adding after this input Index. If you want to add a point before the first index, the value must be "0".

ReturnType

Integer

HVAC_Rigid_Duct.GetColor()

Lets you retrieve the color of the rigid duct from the geometrical feature.

Signature

HVAC_Rigid_Duct.GetColor(oRed : Integer, oGreen : Integer, oBlue : Integer)

Arguments

Name Input/Output Required? Type Comment
oRed Out Integer Value between 0 and 255
oGreen Out Integer Value between 0 and 255
oBlue Out Integer Value between 0 and 255

Example

let Red(Integer)
let Green(Integer)
let Blue(Integer)
Red = 120
Green =180
Blue = 255
let R(Integer)
let G(Integer)
let B(Integer)

Message("SetColor Called")

prd.SetColor(Red, Green, Blue)

Message("GetColor Called")

prd.GetColor(R, G, B)

if(  ( Red == R) and (Green == G) and  ( Blue == B) )
{
	Message("color set and get are equal ")
	Message("color set ", Red ,Green , Blue)
	Message("colorGet" ,R ,G , B)	
}
else
{
	Message("set color is different from get color  ")
}

HVAC_Rigid_Duct.GetDefaultBendRadius()

Signature

HVAC_Rigid_Duct.GetDefaultBendRadius(oDefaultBendRadius : LENGTH)

Arguments

Name Input/Output Required? Type Comment
oDefaultBendRadius Out LENGTH Default bend radius value existing on the current route.

HVAC_Rigid_Duct.GetMinimunStraightLength()

Signature

HVAC_Rigid_Duct.GetMinimunStraightLength(oMinimumStraightLength : LENGTH)

Arguments

Name Input/Output Required? Type Comment
oMinimumStraightLength Out LENGTH Minimum straight length value on the route.

HVAC_Rigid_Duct.GetNodeBendRadius()

Signature

HVAC_Rigid_Duct.GetNodeBendRadius(iIndex : Integer, oRadius : LENGTH)

Arguments

Name Input/Output Required? Type Comment
iIndex In Integer Node index at which user needs a bend radius.
oRadius Out LENGTH Node bend radius value at existing node index.

HVAC_Rigid_Duct.GetNodeType()

Signature

HVAC_Rigid_Duct.GetNodeType(iIndex : Integer, oEnumNodeType : HvacNodeType)

Arguments

Name Input/Output Required? Type Comment
iIndex In Integer -
oEnumNodeType Out HvacNodeType CATHvaDuctPortPoint, CATHvaDuctDirectionalPoint, CATHvaDuctComputedPoint, CATHvaDuct3DPoint, CATHvaParallelPoint

HVAC_Rigid_Duct.GetOpacity()

Signature

HVAC_Rigid_Duct.GetOpacity(oOpacity : Integer)

Arguments

Name Input/Output Required? Type Comment
oOpacity Out Integer -

HVAC_Rigid_Duct.GetSectionOrientation()

Signature

HVAC_Rigid_Duct.GetSectionOrientation(oEnumOrientationType : HvacOrientation)

Arguments

Name Input/Output Required? Type Comment
oEnumOrientationType Out HvacOrientation CATHvaDuctVerticalUp, CATHvaDuctVerticalDown, CATHvaDuctHorizontalLeft, CATHvaDuctHorizontalRight

HVAC_Rigid_Duct.RemoveNode()

Lets you remove a list of nodes from the reference route.

Signature

HVAC_Rigid_Duct.RemoveNode(iListIndex : List) : Integer

Arguments

Name Input/Output Required? Type Comment
iListIndex In List List of node index positions that need to be removed from the reference route

ReturnType

Integer

HVAC_Rigid_Duct.ResetNodeBendRadiustoDefault()

Signature

HVAC_Rigid_Duct.ResetNodeBendRadiustoDefault(iIndex : Integer)

Arguments

Name Input/Output Required? Type Comment
iIndex In Integer Node index at which user resets the bend radius to default bend radius.

HVAC_Rigid_Duct.SetColor()

Lets you set the color of the rigid duct from the geometrical feature.

Signature

HVAC_Rigid_Duct.SetColor(iRed : Integer, iGreen : Integer, iBlue : Integer)

Arguments

Name Input/Output Required? Type Comment
iRed In Integer Value between 0 and 255
iGreen In Integer Value between 0 and 255
iBlue In Integer Value between 0 and 255

Example

let Red(Integer)
let Green(Integer)
let Blue(Integer)
Red = 120
Green =180
Blue = 255
let R(Integer)
let G(Integer)
let B(Integer)

Message("SetColor Called")

prd.SetColor(Red, Green, Blue)

Message("GetColor Called")

prd.GetColor(R, G, B)

if(  ( Red == R) and (Green == G) and  ( Blue == B) )
{
	Message("color set and get are equal ")
	Message("color set ", Red ,Green , Blue)
	Message("colorGet" ,R ,G , B)	
}
else
{
	Message("set color is different from get color  ")
}

HVAC_Rigid_Duct.SetDefaultBendRadius()

Signature

HVAC_Rigid_Duct.SetDefaultBendRadius(iDefaultBendRadius : LENGTH) : Integer

Arguments

Name Input/Output Required? Type Comment
iDefaultBendRadius In LENGTH Default bend radius value.

ReturnType

Integer

HVAC_Rigid_Duct.SetMinimunStraightLength()

Signature

HVAC_Rigid_Duct.SetMinimunStraightLength(iMinimunStraightLength : LENGTH)

Arguments

Name Input/Output Required? Type Comment
iMinimunStraightLength In LENGTH Minimum straight length value on the route.

HVAC_Rigid_Duct.SetNodeBendRadius()

Signature

HVAC_Rigid_Duct.SetNodeBendRadius(iIndex : Integer, iRadius : LENGTH) : Integer

Arguments

Name Input/Output Required? Type Comment
iIndex In Integer Node index at which user needs to set a bend radius.
iRadius In LENGTH Node bend radius value at existing node index.

ReturnType

Integer

HVAC_Rigid_Duct.SetOpacity()

Signature

HVAC_Rigid_Duct.SetOpacity(iOpacity : Integer)

Arguments

Name Input/Output Required? Type Comment
iOpacity In Integer -

HVAC_Rigid_Duct.SetSectionOrientation()

Signature

HVAC_Rigid_Duct.SetSectionOrientation(iEnumOrientation : HvacOrientation)

Arguments

Name Input/Output Required? Type Comment
iEnumOrientation In HvacOrientation CATHvaDuctVerticalUp, CATHvaDuctVerticalDown, CATHvaDuctHorizontalLeft, CATHvaDuctHorizontalRight

HVAC_Rigid_Duct.SetShape()

Signature

HVAC_Rigid_Duct.SetShape(V_Shape_Enum : V_Shape_Enum)

Arguments

Name Input/Output Required? Type Comment
V_Shape_Enum In V_Shape_Enum Enum is already defined in metadata as Circle, Ellipse, Rectangle or Flat Oval.

HVAC_Rigid_Duct_Inst.PropagateReferenceToGeometry()

Launches PLM Update to propagate attribute, apply and update geometry as per the shape and launch geometrical update. If any geometrical error appears, then this method will try to correct the issue and for some issues, it returns the error.

Signature

HVAC_Rigid_Duct_Inst.PropagateReferenceToGeometry() : Integer

ReturnType

Integer

Important Note

Regarding the following functions:

  • Add3Point()
  • RemoveNode()
  • GetNodeType()
  • SetDefaultBendRadius()
  • GetDefaultBendRadius()
  • SetNodeBendRadius()
  • GetNodeBendRadius()
  • ResetNodeBendRadiustoDefault()
  • SetMinimumStraightLength()
  • GetMinimumStraightLength()
  • PropagateReferenceToGeometry()
  • SetNewReference()

If you call thiese functions, then only PLM attributes will be updated, but it will not update the geometry, then it may cause or not check build break in the geometry. After having completed all the modified routes functionality by calling these functions, its user responsability to call the PropagateReferenceToGeometry() function at the end to update the geometry. This function will correct bad values internally if it cause some build break or other bad issues.

HVAC_Rigid_Duct_Inst.SetNewReference()

Signature

HVAC_Rigid_Duct_Inst.SetNewReference(VPMReference : VPMReference) : Integer

Arguments

Name Input/Output Required? Type Comment
VPMReference In VPMReference VPMReference of the route filtered from the Data Setup or provided by the user as input from which attributes need to be copied.

If input VPMReference is not NULL, then:

  • NewFrom -> Reuse or,
  • NewFrom -> ReuseorNewReference or
  • NewFrom -> NewReference

If input VPMReference is NULL, then NewFrom -> NewReference

ReturnType

Integer

PLMEnsRefEquipment.CreateHvacPort()

Lets you create HVAC ports.

Signature

PLMEnsRefEquipment.CreateHvacPort(X_OriginPt : Real, Y_OriginPt : Real, Z_OriginPt : Real, X_AlignDir : Real, Y_AlignDir : Real, Z_AlignDir : Real, X_OrientDir : Real, Y_OrientDir : Real, Z_OrientDir : Real, PortType : HvacPort_Types, PortName : String, X_OffsetPoint : Real [, Y_OffsetPoint : Real, Z_OffsetPoint : Real]) : HVAC_PartPort

Arguments

Name Input/Output Required? Type Comment
X_OriginPt In Real Defines the center point of the port: X coordinate
Y_OriginPt In Real Defines the center point of the port: Y coordinate
Z_OriginPt In Real Defines the center point of the port: Z coordinate
X_AlignDir In Real Defines the alignment direction: X coordinate
Y_AlignDir In Real Defines the alignment direction: Y coordinate
Z_AlignDir In Real Defines the alignment direction: Z coordinate
X_OrientDir In Real Defines the orientation direction: X coordinate
Y_OrientDir In Real Defines the orientation direction: Y coordinate
Z_OrientDir In Real Defines the orientation direction: Z coordinate
PortType In HvacPort_Types Defines the type of the port from the predefined list in HvacPort_Types
PortName In String Defines the name of the port
X_OffsetPoint In Real If the port type is two points part or hole port, you must define the offset from the center of the port
Y_OffsetPoint In No Real -
Z_OffsetPoint In No Real -

ReturnType

HVAC_PartPort

Example

/*To create a two point hole port on hvac part*/

prd is Hvac_Part 

let X_OPt(Real)
let Y_OPt(Real)
let Z_OPt(Real)
X_OPt=0
Y_OPt=0
Z_OPt=0
 
let X_alignDir(Real)
let Y_alignDir(Real)
let Z_alignDir(Real)
X_alignDir=0
Y_alignDir=0
Z_alignDir=2
 
let X_orientDir(Real)
let Y_orientDir(Real)
let Z_orientDir(Real)
X_orientDir=0
Y_orientDir=2
Z_orientDir=0

let X_offsetpt(Real)
let Y_offsetpt(Real)
let Z_offsetpt(Real)
X_offsetpt=2
Y_offsetpt=0
Z_offsetpt=0
 
let porttype(HvacPort_Types)
porttype= "CATHva2HolePort"

let portName(String)
portName = "test1"
 
let port(Hvac_Port)
 
Message("CreateHvacPortCalled")
 
port = prd. CreateHvacPort(X_OPt, Y_OPt, Z_OPt, X_alignDir, Y_alignDir, Z_alignDir, X_orientDir, Y_orientDir, Z_orientDir, porttype,
portName, X_offsetpt,Y_offsetpt,Z_offsetpt)

SharedEquipmentPart.CreateHvacPort()

Lets you create HVAC ports.

Signature

SharedEquipmentPart.CreateHvacPort(X_OriginPt : Real, Y_OriginPt : Real, Z_OriginPt : Real, X_AlignDir : Real, Y_AlignDir : Real, Z_AlignDir : Real, X_OrientDir : Real, Y_OrientDir : Real, Z_OrientDir : Real, PortType : HvacPort_Types, PortName : String, X_OffsetPoint : Real [, Y_OffsetPoint : Real, Z_OffsetPoint : Real]) : HVAC_PartPort

Arguments

Name Input/Output Required? Type Comment
X_OriginPt In Real Defines the center point of the port: X coordinate
Y_OriginPt In Real Defines the center point of the port: Y coordinate
Z_OriginPt In Real Defines the center point of the port: Z coordinate
X_AlignDir In Real Defines the alignment direction: X coordinate
Y_AlignDir In Real Defines the alignment direction: Y coordinate
Z_AlignDir In Real Defines the alignment direction: Z coordinate
X_OrientDir In Real Defines the orientation direction: X coordinate
Y_OrientDir In Real Defines the orientation direction: Y coordinate
Z_OrientDir In Real Defines the orientation direction: Z coordinate
PortType In HvacPort_Types Defines the type of the port from the predefined list in HvacPort_Types
PortName In String Defines the name of the port
X_OffsetPoint In Real If the port type is two points part or hole port, you must define the offset from the center of the port
Y_OffsetPoint In No Real -
Z_OffsetPoint In No Real -

ReturnType

HVAC_PartPort

Example

/*To create a two point hole port on hvac part*/

prd is Hvac_Part 

let X_OPt(Real)
let Y_OPt(Real)
let Z_OPt(Real)
X_OPt=0
Y_OPt=0
Z_OPt=0
 
let X_alignDir(Real)
let Y_alignDir(Real)
let Z_alignDir(Real)
X_alignDir=0
Y_alignDir=0
Z_alignDir=2
 
let X_orientDir(Real)
let Y_orientDir(Real)
let Z_orientDir(Real)
X_orientDir=0
Y_orientDir=2
Z_orientDir=0

let X_offsetpt(Real)
let Y_offsetpt(Real)
let Z_offsetpt(Real)
X_offsetpt=2
Y_offsetpt=0
Z_offsetpt=0
 
let porttype(HvacPort_Types)
porttype= "CATHva2HolePort"

let portName(String)
portName = "test1"
 
let port(Hvac_Port)
 
Message("CreateHvacPortCalled")
 
port = prd. CreateHvacPort(X_OPt, Y_OPt, Z_OPt, X_alignDir, Y_alignDir, Z_alignDir, X_orientDir, Y_orientDir, Z_orientDir, porttype,
portName, X_offsetpt,Y_offsetpt,Z_offsetpt)

VPMReference.CreateHvacPortOnReference()

Signature

VPMReference.CreateHvacPortOnReference(PortPtOrigin : GSMPoint, AlignDir : Direction, OrientDir : Direction, PortType : HVAC_PartPort, PortName : String, OffsetPt : GSMPoint]) : HVAC_PartPort

Arguments

Name Input/Output Required? Type Comment
PortPtOrigin In GSMPoint -
AlignDir In Direction -
OrientDir In Direction -
PortType In HvacPort_Types -
PortName In String -
OffsetPt In GSMPoint -

ReturnType

HVAC_PartPort

Example

let prd(VPMReference)
let pGSMPoint_1(GSMPoint) 
let pGSMPoint_2(GSMPoint)
let pGSMPointCoord(GSMPointCoord)
let DirectionAlign(Direction) 
let DirectionOrient(Direction)
let pPoint(Point)
let pPointOffset(Point)
let pPointType(PointType)
let pBody(BodyFeature)
 
pPointType = "Coordinates"

let NameProduct(String)
NameProduct = prd.Name

if("Physical Product00000002_95E5D97B-0000-1C0C-5E0DB5C000044475" == NameProduct)
{
   pBody = prd->Find ("BodyFeature","",TRUE)
   
   if (NULL <> pBody)
   {
      Trace(1, " Body retrieved : ",pBody.Name)
      let porttype(HvacPort_Types)
      porttype= "CATHvaPartPort"
      
	  /* Part Port, Direct      */
	  /* =======================*/

      let portName(String)
      portName = "HVA_Port_10_Part_Direct"

	  SetWorkingContext(pBody)

      let port(HVAC_Port)
      
      pPoint = pBody->Find("Point","x.Name==\"Point_01\"",TRUE) 
      set pGSMPoint_1 = pPoint
      
	  pGSMPoint_2 = NULL
    
      DirectionAlign = direction(1mm, 0mm, 0mm)
      DirectionOrient = direction(0mm, 0mm, 1mm)
      
      port = prd.CreateHvacPortOnReference(pGSMPoint_1, DirectionAlign, DirectionOrient, porttype, portName, pGSMPoint_2)
      if (NULL == port )
		{
			Message("Creation FAIL")
		}

	  pBody.Update()
   }  
}