textpcbxyprompt.bas
来自「Protel99se线路图增强程序:PCB宏命令,可以调用它得到座标」· BAS 代码 · 共 55 行
BAS
55 行
'----------------------------------------------------
' PCB prompt for coordinate example
' Copyright (c) 2001 Considered Solutions
'----------------------------------------------------
' This macro will prompt for a PCB coordinate and
' display the result in a dialog box
' The ExposePCBToMacro server must be installed
' for this macro to run successfully.
'....................................................
Sub Main
Dim Result As Integer
Dim ChoosenOK as String
Dim XString as String
Dim YString as String
Dim XOffsetString as String
Dim YOffsetString as String
ResetParameters
AddStringParameter "Prompt", "Choose your location to pump back into Client Basic"
RunProcess "ExposePCBToMacro:PromptUserForCoordinate"
GetStringParameter "OK", ChoosenOK
if ChoosenOK = "Yes" then
GetStringParameter "X", XString
GetStringParameter "Y", YString
GetStringParameter "OffsetX", XOffsetString
GetStringParameter "OffsetY", YOffsetString
Call ShowCoords(XString, YString, XOffsetString, YOffsetString)
end if
End Sub
Sub ShowCoords(X As String, Y As String,Xoff As String, Yoff As String )
' Dialog box definition
Begin Dialog DlgType 100,100,190, 100, "X Y Coords"
Text 5, 13, 41, 10, "X:"
TextBox 54, 12, 60, 12, .X
Text 5, 28, 41, 10, "Y:"
TextBox 54, 27, 60, 12, .Y
Text 5, 43, 41, 10, "Offset X:"
TextBox 54, 42, 60, 12, .XOffset
Text 5, 58, 41, 10, "Offset Y:"
TextBox 54, 57, 60, 12, .YOffset
OKButton 130, 12, 40, 12
End Dialog
Dim DlgBox As DlgType
Dim Result As Integer
DlgBox.X = X
DlgBox.Y = Y
DlgBox.XOffset = Xoff
DlgBox.YOffset = Yoff
Result = Dialog(DlgBox) ' call the dialog box
End Sub
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?