

START HEADER:
Strategy file name: /usr/weber/database/strategies/Surface_finish
Instruction 1: Use the Edit Strategy Vars in strategy settings. 
Instruction 2: Set the edit strategy var to 2.  The variable Finish_val is the surface finish
END HEADER:

START ENTITY REFERENCES:
Xxx.Ext.Ent.P76: POINT: Pick Check Mark Vertex Location
END ENTITY REFERENCES:
  
START VARIABLE REFERENCES:
Xxx_ext_var_finish_val: A2:  active:
END VARIABLE REFERENCES:

START OBJECT: O1
Object paths off:
     
START RECORD:
Record descr: Retrieve Text Width and Height into variables
V1=NumericVariable("Xxx_var_text_width",WsVariationVars,GetDefault(WsTextWidth))
V1=NumericVariable("Xxx_var_text_height",WsVariationVars,GetDefault(WsTextHeight))
END RECORD:
     
START RECORD:
Record descr: Check mark Construction Geometry
Pc=ParameterReturnPt("Xxx.Ext.Ent.P76",0,WsGeomCenter)
C1=RadiusCenter("Xxx_var_text_height*4",Pc)
Stat=NameEntity(C1,"Xxx.Ent.C3")
Stat=DeleteEntity(Pc)
Pc=ParameterReturnPt("Xxx.Ext.Ent.P76",0,WsGeomCenter)
V2=FreeParameter("Angle",0)
L1=PtDistAngle(Pc,"Xxx_var_text_height*2",V2,1)
Stat=NameEntity(L1,"Xxx.Ent.L4")
Stat=DeleteEntity(Pc)
Pc=ParameterReturnPt("Xxx.Ext.Ent.P76",0,WsGeomCenter)
V1=FreeParameter("Angle1",120)
L1=PointAngle(Pc,V1)
Stat=NameEntity(L1,"Xxx.Ent.L5")
Stat=DeleteEntity(Pc)
Pc=ParameterReturnPt("Xxx.Ext.Ent.P76",0,WsGeomCenter)
V1=FreeParameter("Angle2",60)
L1=PointAngle(Pc,V1)
Stat=NameEntity(L1,"Xxx.Ent.L6")
Stat=DeleteEntity(Pc)
END RECORD:
     
START RECORD:
Record descr: Trim Check Mark To Size
Selectpt=ParameterPt("Xxx.Ent.L5",0.5045581825005052)
Pt=Intersect("Xxx.Ent.L5","Xxx.Ent.L4",Selectpt)
No_trim=TrimEntity("Xxx.Ent.L5",Pt,0)
Stat=DeleteEntity(Selectpt)
Stat=DeleteEntity(Pt)
Selectpt=ParameterPt("Xxx.Ent.L6",0.5046367021737248)
Pt=Intersect("Xxx.Ent.L6","Xxx.Ent.C3",Selectpt)
No_trim=TrimEntity("Xxx.Ent.L6",Pt,0)
Stat=DeleteEntity(Selectpt)
Stat=DeleteEntity(Pt)
Selectpt=ParameterPt("Xxx.Ent.L5",0.9979317606214962)
No_trim=CornerTrim("Xxx.Ent.L5",1,"Xxx.Ent.L6",1,Selectpt)
Stat=DeleteEntity(Selectpt)
END RECORD:
     
START RECORD:
Record descr: Delete Unneeded construction Geometry
Stat=DeleteEntity("Xxx.Ent.C3")
Stat=DeleteEntity("Xxx.Ent.L4")
END RECORD:
     
START RECORD:
Record descr: LINE: Point angle
Pc=ParameterReturnPt("Xxx.Ent.L5",0.947115769261541,WsGeomCenter)
V1=FreeParameter("Angle",0)
L1=PointAngle(Pc,V1)
Stat=NameEntity(L1,"Xxx.Ent.L7")
Stat=DeleteEntity(Pc)
END RECORD:
     
START RECORD:
Record descr: TRIM: Trim to an element
Selectpt=ParameterPt("Xxx.Ent.L7",0.5215837607918804)
Pt=Intersect("Xxx.Ent.L7","Xxx.Ent.L5",Selectpt)
No_trim=TrimEntity("Xxx.Ent.L7",Pt,1)
Stat=DeleteEntity(Selectpt)
Stat=DeleteEntity(Pt)
END RECORD:
     
START RECORD:
Record descr: TRIM: Trim to an element
Selectpt=ParameterPt("Xxx.Ent.L7",0.001755001755001755)
Pt=Intersect("Xxx.Ent.L7","Xxx.Ent.L6",Selectpt)
No_trim=TrimEntity("Xxx.Ent.L7",Pt,0)
Stat=DeleteEntity(Selectpt)
Stat=DeleteEntity(Pt)
END RECORD:
     
START RECORD:
Record descr: POINT: Polar
Pc=ParameterReturnPt("Xxx.Ent.L7",0.5032217834130118,WsGeomCenter)
V3=FreeParameter("Z",0)
Pt=PtIncrPolar(Pc,"-Xxx_var_text_width*2","Xxx.Ent.L7",V3)
Stat=NameEntity(Pt,"Xxx.Ent.P8")
Stat=DeleteEntity(Pc,WsTrue)
END RECORD:
     
START RECORD:
Record descr: DIM: Text leader
Ps=ParameterReturnPt("Xxx.Ent.P8",0,WsGeometryEnd)
V1=FreeParameter("Xloc",0)
V2=FreeParameter("Yloc",0)
V3=StringConstant(FindNamedVar("Xxx_ext_var_finish_val",WsVariationVars))
V4=StringConstant("CH")
Pe=PtIncrXYZ(Ps,V1,V2,0)
E1=TextArrow(WsTextLeader,Ps,Pe,V3,V4)
Stat=NameEntity(E1,"Xxx.Ent.D9")
Stat=DeleteEntity(Ps)
Stat=DeleteEntity(Pe)
END RECORD:
     
START RECORD:
Record descr: DELETE: Entities
Stat=DeleteEntity("Xxx.Ent.L7")
Stat=DeleteEntity("Xxx.Ent.P8")
END RECORD:
     
END OBJECT: O1
     

