⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 自定义基本图.tbl

📁 电气控制仿真软件
💻 TBL
字号:
<?xml version="1.0" encoding="gb2312"?>
<vg version="451" gridsize="4" zoom="200,100" activesheetindex="12" range="0,0,800,553" caption="般箱子" pattern="1">
<page name="Page" bounds="0,0,827,1169" visible="false" margin="100,100,100,100" paperwidth="2100" paperheight="2969"/>
<sheet name="有向线">
<line name="Line1" origin="156,156" endarrow="1" linkmode="1">
<points>
56,112,6
256,200,2
</points>
</line>
</sheet>
<sheet name="水平尺寸线">
<line name="Line1" origin="142.5,102.5" protect="8" startarrow="15" endarrow="15">
<points>
31,68,6
270,68,2
</points>
<line name="Arrow1" origin="31,68" angle="180">
<points>
37,62,6
25,74,2
31,68,6
37,68,2
</points>
</line>
<line name="Arrow2" origin="270,68">
<points>
276,62,6
264,74,2
270,68,6
276,68,2
</points>
</line>
<text name="Text1" bounds="136.5,69,164.5,91" origin="31,68" autosize="true" border="$0" fontname="宋体" fontsize="16" textalign="6" text="12m"/>
</line>
</sheet>
<sheet name="垂直尺寸线">
<line name="Line1" origin="232.5,105.5" protect="4" startarrow="15" endarrow="15">
<points>
121,69,6
121,288,2
</points>
<line name="Arrow1" origin="121,69" angle="90">
<points>
127,63,6
115,75,2
121,69,6
127,69,2
</points>
</line>
<line name="Arrow2" origin="121,288" angle="270">
<points>
127,282,6
115,294,2
121,288,6
127,288,2
</points>
</line>
<text name="Text1" bounds="216.5,70,244.5,93" origin="121,69" angle="270" autosize="true" border="$0" fontname="宋体" fontsize="16" textalign="6" text="12m"/>
</line>
</sheet>
<sheet name="自定义属性线">
<line name="Line1" origin="154.5,114.5" myprop="&apos;Hello&apos;" startarrow="15" endarrow="15">
<points>
43,80,6
288,80,2
</points>
<line name="Arrow1" origin="43,80" angle="180">
<points>
49,74,6
37,86,2
43,80,6
49,80,2
</points>
</line>
<line name="Arrow2" origin="288,80">
<points>
294,74,6
282,86,2
288,80,6
294,80,2
</points>
</line>
<text name="Text1" bounds="75.5,81,255.5,103" origin="43,80" autosize="true" border="$0" fontname="宋体" fontsize="16" textalign="6" text="这条线定义了MyProp属性"/>
</line>
</sheet>
<sheet name="水平线">
<line name="Line1" origin="183,73" protect="8">
<points>
28,73,6
338,73,2
</points>
</line>
</sheet>
<sheet name="垂直线">
<line name="Line1" origin="130,166" protect="4">
<points>
130,63,6
130,269,2
</points>
</line>
</sheet>
<sheet name="指示1" protect="64">
<line name="Line2" origin="41,166" linkmode="3" points="41,166,6">
<programe>
Published Function OnNodeChange(Sender)
;
End Function
</programe>
</line>
<text name="Text1" bounds="176,54,396,166" origin="176,90" autosize="true" border="$0" fontname="宋体" fontsize="16" textalign="24" text="The height of the text box
and its associated line 
increases or decreases as
you add text. To change the
width of the comment, drag
the side handle."/>
<line name="Line1" origin="100,210" endarrow="1" linkmode="3">
<points>
41,166,6
170,105,2
</points>
<programe>
Published Function OnNodeChange(Sender,Index)
Text1.Left = Sender.Points[1].x
Text1.Top = Sender.Points[1].y - Text1.Height / 2
End Function
</programe>
<link>
Line2,P0,P0
</link>
</line>
</sheet>
<sheet name="指示2">
<line name="Line2" origin="41,166" protect="8" linkmode="3" points="32,160,6">
<programe>
Published Function OnNodeChange(Sender)
;
End Function
</programe>
</line>
<line name="Line1" origin="100,210" protect="8" endarrow="1" linkmode="3">
<points>
32,160,6
193,160,2
</points>
<programe>
Published Function OnNodeChange(Sender,Index)
Text1.Left = Sender.Points[1].x
End Function
</programe>
<link>
Line2,P0,P0
Text1,P1,Center
</link>
</line>
<text name="Text1" bounds="193,149,277,171" origin="193,140" autosize="true" border="$0" fontname="宋体" fontsize="16" textalign="24" text="Angle Text"/>
</sheet>
<sheet name="连接线">
<line name="Line1" type="Link" origin="100,32" linkmode="1">
<points>
32,32,6
168,32,2
</points>
</line>
</sheet>
<sheet name="字线">
<line name="Line1" origin="168,138" linkmode="1">
<points>
80,36,6
228,164,2
</points>
<programe>
Published Function OnNodeChange(Sender,Index)

End Function
</programe>
<link>
Line2,P1,P0
Line3,P0,P0
</link>
</line>
<text name="Text1" bounds="52,59,86,77" origin="52,68" visible="false" pattern="1" autosize="true" border="$0" fontname="宋体" fontsize="12" text="文字0"/>
<line name="Line2" origin="228,164" linkmode="3" points="228,164,6">
<programe>
Published Function OnNodeChange(Sender,Index)
ResetTexts()
End Function
</programe>
</line>
<line name="Line3" origin="80,36" linkmode="3" points="80,36,6">
<programe>
Published Function OnNodeChange(Sender,Index)
ResetTexts()
End Function
</programe>
</line>
<group name="Group1">
</group>
<programe>
Private Function Initialize(Sender)

End Function
Private Function ResetTexts()
d=sqrt( sqr( Line1.Points[0].x - Line1.Points[1].x ) + sqr( Line1.Points[0].y - Line1.Points[1].y ) )
ag = PointToAngle( Line1.Points[1].x, Line1.Points[1].y, Line1.Points[0].x, Line1.Points[0].y )
w = Text1.Width
n = int( d / ( w + 5 ) )
while Group1.UnitCount &gt; n
	DeleteUnit( Group1.Units[0] )
wend
while Group1.UnitCount &lt; n
	u = Copy( Text1 )
	Group1.Add( u )
  u.Visible = true
wend
i = 0
while i &lt; n
  u=Group1.Units[i]
  x = Line1.Points[0].x + ( Line1.Points[1].x - Line1.Points[0].x ) * i / n
  y = Line1.Points[0].y + ( Line1.Points[1].y - Line1.Points[0].y ) * i / n
  u.MoveTo( x, y - Text1.Height / 2 )
  u.Angle = ag
	i = i + 1
wend
End Function
</programe>
</sheet>
<sheet name="字弧">
<shape name="Arc1" type="Arc" bounds="76,48,280,244" origin="182,146" endangle="133.64456199" startangle="225"/>
<line name="Line1" origin="108,216" linkmode="1" points="106,216,6">
<programe>
Published Function OnNodeChange(Sender,Index)
r = sqrt( sqr( Line1.Points[0].x - Line2.Points[0].x ) + sqr( Line1.Points[0].y - Line2.Points[0].y ) )
if r = 0 then
	ox = ( Line1.Points[0].x + Line2.Points[0].x ) / 2
	oy = ( Line1.Points[0].y + Line2.Points[0].y ) / 2
	r = sqrt( sqr( Sender.Points[0].x - ox ) + sqr( Sender.Points[0].y - oy ) ) / 2
	Arc1.SetBounds( ox - r, oy - r, 2 * r, 2 * r )
	Arc1.StartAngle = PointToAngle( Line1.Points[0].x, Line1.Points[0].y, ox, oy )
	Arc1.EndAngle = PointToAngle( Line2.Points[0].x, Line2.Points[0].y, ox, oy )
else
  Line3.OnNodeChange(Line3,0)
end if
End Function
</programe>
</line>
<line name="Line2" origin="108,76" linkmode="1" points="107,75,6">
<programe>
Published Function OnNodeChange(Sender,Index)
Line1.OnNodeChange( Line1, 0 )
End Function
</programe>
</line>
<line name="Line3" origin="416,168" points="276,120,6">
<programe>
Published Function OnNodeChange(Sender,Index)
ox = ( Line1.Points[0].x + Line2.Points[0].x ) / 2
oy = ( Line1.Points[0].y + Line2.Points[0].y ) / 2
if ( Line2.Points[0].y - Line1.Points[0].y ) = 0 then
	k1 = 100000000000
else
	k1=-( Line2.Points[0].x - Line1.Points[0].x )/( Line2.Points[0].y - Line1.Points[0].y )
end if
b1=oy-k1*ox
ox = ( Line3.Points[0].x + Line2.Points[0].x ) / 2
oy = ( Line3.Points[0].y + Line2.Points[0].y ) / 2
if ( Line3.Points[0].y - Line2.Points[0].y ) = 0 then
	k2=100000000000
else
	k2=-( Line3.Points[0].x - Line2.Points[0].x )/( Line3.Points[0].y - Line2.Points[0].y )
end if
b2=oy-k2*ox
if k1 = k2 then
	ox = 1000
else
	ox=( b2 - b1 ) / ( k1 - k2 )
end if
oy = k1 * ox + b1
r = sqrt( sqr( Sender.Points[0].x - ox ) + sqr( Sender.Points[0].y - oy ) )
Arc1.SetBounds( ox - r, oy - r, 2 * r, 2 * r )
ag1 = PointToAngle( Line1.Points[0].x, Line1.Points[0].y, ox, oy )
ag2 = PointToAngle( Line2.Points[0].x, Line2.Points[0].y, ox, oy )
ag3 = PointToAngle( Line3.Points[0].x, Line3.Points[0].y, ox, oy )
if ag1 &lt; ag2 then
	if( ag3 &lt; ag1 ) or ( ag3 &gt; ag2 ) then
  	ag=ag2
    ag2=ag1
    ag1=ag
	end if
else if ag1 = ag2 then
else if ag3 &gt; ag1 then
else if ag3 &lt; ag2 then
else
	ag=ag2
  ag2=ag1
  ag1=ag
end if
Arc1.StartAngle = ag1
Arc1.EndAngle = ag2
M_PI=3.14159265359
if ag2 &lt; ag1 then
	ag2 = ag2 + 360
end if
ag = ag2 - ag1
ln = ag / 360 * 2 * M_PI * r
w=Text1.Width + 5
n=int(ln / w)
while Group1.UnitCount &gt; n
	DeleteUnit( Group1.Units[0] )
wend
while Group1.UnitCount &lt; n
	u = Copy( Text1 )
	Group1.Add( u )
  u.Visible = true
wend
delta = asin( w / 2 / r ) * 180 / M_PI
i = 0
theta = ag1
while i &lt; n
  u=Group1.Units[i]
  alpha = theta - 90
  x = ox + r * cos( theta * M_PI / 180 )
  y = oy - r * sin( theta * M_PI / 180 )
  u.MoveTo( x - Text1.Width, y - Text1.Height / 2 )
  u.Angle = alpha + delta
  theta=theta + ag / n
	i = i + 1
wend
End Function
</programe>
</line>
<text name="Text1" bounds="120,79,156,97" origin="156,88" visible="false" pattern="1" autosize="true" border="$0" fontname="宋体" fontsize="12" text="文字1"/>
<group name="Group1">
</group>
<programe>
Private Function Initialize(Sender)

End Function
</programe>
</sheet>
<sheet name="折线条">
<line name="Line1" origin="168,138" linetype="3" endarrow="1" linkmode="1">
<points>
52,40,6
104,164,2
208,160,2
</points>
<programe>
Published Function OnNodeChange(Sender,Index)
d=sqrt( sqr( Line1.Points[0].x - Line1.Points[1].x ) + sqr( Line1.Points[0].y - Line1.Points[1].y ) )
ag = PointToAngle( Line1.Points[1].x, Line1.Points[1].y, Line1.Points[0].x, Line1.Points[0].y )
w = Text1.Width
n = int( d / ( w + 5 ) )
while Group1.UnitCount &gt; n
	DeleteUnit( Group1.Units[0] )
wend
while Group1.UnitCount &lt; n
	u = Copy( Text1 )
	Group1.Add( u )
  u.Visible = true
wend
i = 0
while i &lt; n
  u=Group1.Units[i]
  x = Line1.Points[0].x + ( Line1.Points[1].x - Line1.Points[0].x ) * i / n
  y = Line1.Points[0].y + ( Line1.Points[1].y - Line1.Points[0].y ) * i / n
  u.MoveTo( x, y - Text1.Height / 2 )
  u.Angle = ag
	i = i + 1
wend
End Function
</programe>
</line>
</sheet>
<sheet name="边缘线">
<line name="Line1" origin="168,138" linkmode="1">
<points>
80,36,6
228,164,2
</points>
<programe>
Published Function OnNodeChange(Sender,Index)

End Function
</programe>
<link>
Line3,P0,P0
Line2,P1,P0
</link>
</line>
<line name="Line2" origin="228,164" linkmode="3" points="228,164,6">
<programe>
Published Function OnNodeChange(Sender,Index)
ResetTexts()
End Function
</programe>
</line>
<line name="Line3" origin="80,36" linkmode="3" points="80,36,6">
<programe>
Published Function OnNodeChange(Sender,Index)
ResetTexts()
End Function
</programe>
</line>
<line name="Line4" origin="68,72">
<points>
72,64,6
64,80,2
</points>
</line>
<group name="Group1">
</group>
<programe>
Private Function Initialize(Sender)

End Function
Private Function ResetTexts()
d=sqrt( sqr( Line1.Points[0].x - Line1.Points[1].x ) + sqr( Line1.Points[0].y - Line1.Points[1].y ) )
ag = PointToAngle( Line1.Points[1].x, Line1.Points[1].y, Line1.Points[0].x, Line1.Points[0].y )
w = Line4.Width
n = int( d / ( w + 5 ) )
while Group1.UnitCount &gt; n
	DeleteUnit( Group1.Units[0] )
wend
while Group1.UnitCount &lt; n
	u = Copy( Line4 )
	Group1.Add( u )
  u.Visible = true
wend
i = 0
while i &lt; n
  u=Group1.Units[i]
  x = Line1.Points[0].x + ( Line1.Points[1].x - Line1.Points[0].x ) * i / n
  y = Line1.Points[0].y + ( Line1.Points[1].y - Line1.Points[0].y ) * i / n
  u.MoveTo( x, y - Line4.Height / 2 )
  u.Angle = ag
	i = i + 1
wend
End Function
</programe>
</sheet>
</vg>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -