EKL - Set Pipe Attributes

Set 3D Pipe Description attribute from Parent LineID

Compute pipe description from Parent LineID description (linear price)  + Pipe length computation

/* PipeOcc   : Piping_Pipe_Occurence  */

<strong>let</strong> inst(VPMInstance)
<strong>let</strong> ref(VPMReference)

<strong>let</strong> pip(Piping_Pipe)
<strong>let</strong> PipeLength(LENGTH)
<strong>let</strong> EquipedPipeMass(Real)
<strong>let</strong> PipeDescString(String)

<strong>let</strong> LineIDInst(Piping_Line_Inst)
<strong>let</strong> LineID(Piping_Line)
<strong>let</strong> LineIDDesc(String)
<strong>let</strong> PipeLineMass(Real)


//set PipingPartOcc = ThisObject
ref = PipeOcc.Reference


//Retreive PipeLength
<strong>set</strong> pip=ref
PipeLength=pip.V_Length  
//retreive Linear Price on Parent lineID description attribute
LineIDInst=PipeOcc.GetLineIDObject()
<strong>set</strong> LineID=LineIDInst.Reference
LineIDDesc=LineID.V_description
//PipeLineMass=LineIDDesc.ToReal()*1kg
PipeLineMass=LineIDDesc.ToReal()
//compute mass
<strong>If</strong> (LineIDDesc<>"")
<strong>{<!-- --></strong>
                <strong>set</strong> EquipedPipeMass=PipeLineMass*PipeLength*1000mm
                <strong>set</strong> PipeDescString=ToString(EquipedPipeMass)
                pip.V_description=PipeDescString + " Kg"
<strong>}</strong>