AutoKey User Interactive 
MiniCAD

VectorScript Declaration:

FUNCTION   AutoKey
VAR asciiCode:LONGINT ) :BOOLEAN ;

Python:

def  vs.AutoKey():
   return (BOOLEAN, asciiCode)

Description:

Function AutoKey returns TRUE if a non-modifier keyboard character has been continually depressed for longer than the system defined key repeat rate. If a keyboard character has been continually depressed, then ASCII code of the character is returned in parameter asciiCode.

Modifier keys are defined as the Caps Lock, Command, Control, Option, and Shift keys.

説明

ファンクションキー以外のキーが押し続けられていれば、TRUEを返し、同時に押されたキーのASCIIコードを返します。

Parameters:

asciiCode The ASCII code of the key depressed. 押されたキーのASCIIコード

Example:

WHILE NOT AutoKey(keyHit) DO
BEGIN
     SysBeep;
     SysBeep;
END;
Message('The key pressed was ',keyHit);



  BeginModeButtonsText User Interactive 
Vectorworks 2013

VectorScript Declaration:

PROCEDURE   BeginModeButtonsText
;

Python:

def  vs.BeginModeButtonsText():
   return None

Description:

Creates a mode bar buttons help text.

説明

モードバーボタンのヘルプテキストを作成します。

Example:

BeginModeButtonsText;
SetModeButtonText( 'Mode1', 1 );
SetModeButtonText( 'Mode2', 0 );
EndModeButtonsText;

See Also:

EndModeButtonsText   SetModeButtonText  



  CallTool User Interactive 
MiniCAD4.0

VectorScript Declaration:

PROCEDURE   CallTool
( toolID:INTEGER ) ;

Python:

def  vs.CallTool(toolID):
   return None

Description:

Activates the specified Vectorworks tool for a single use. After the tool has been used Vectorworks will revert back to the previously active tool.

Note: Please refer to the VectorScript Appendix for specific tool ID values.

説明

指定した番号のツールを選択します。ツールが使われた後は、この手続きが実行される前に選択されていたツールを選択します。

Parameters:

toolID Vectorworks tool constant. ツール番号

Example:

PushAttrs;
PenFore(16);
PenBack(0);
PenPat(-2);
CallTool(-201);
PopAttrs;



  CapsLock User Interactive 
MiniCAD

VectorScript Declaration:

FUNCTION   CapsLock
:BOOLEAN ;

Python:

def  vs.CapsLock():
   return BOOLEAN

Description:

CapsLock returns TRUE if the Caps Lock was depressed during the last user event. This function operates with the MouseDown, KeyDown, AutoKey, GetPt, GetPtL, GetLine, and GetRect calls.

説明

CapsLockキーが押されている場合は、TRUEを返します。



  Command User Interactive 
MiniCAD

VectorScript Declaration:

FUNCTION   Command
:BOOLEAN ;

Python:

def  vs.Command():
   return BOOLEAN

Description:

Command returns TRUE if the Command key (Mac) or Control key (Windows) was depressed during the last user event. This function operates with the MouseDown, KeyDown, AutoKey, GetPt, GetPtL, GetLine, and GetRect calls.

説明

Command(Control)キーが押されている場合は、TRUEを返します。



  EndModeButtonsText User Interactive 
Vectorworks 2013

VectorScript Declaration:

PROCEDURE   EndModeButtonsText
;

Python:

def  vs.EndModeButtonsText():
   return None

Description:

Ends the creation of a mode bar buttons help text.

説明

モードバーボタンのヘルプテキストの作成を終了します。

Example:

BeginModeButtonsText;
SetModeButtonText( 'Mode1', 1 );
SetModeButtonText( 'Mode2', 0 );
EndModeButtonsText;

See Also:

BeginModeButtonsText   SetModeButtonText  



  GetKeyDown User Interactive 
MiniCAD

VectorScript Declaration:

PROCEDURE   GetKeyDown
VAR asciiCode:LONGINT ) ;

Python:

def  vs.GetKeyDown():
   return asciiCode

Description:

Procedure GetKeyDown pauses execution of a VectorScript routine until a key is pressed by the user. When the key is pressed, the ASCII code of the key is returned.

説明

キーを押されるまで待機し、押されたキーのASCIIコードを返します。

Parameters:

asciiCode ASCII code of key pressed. 押されたキーのASCIIコード



  GetLine User Interactive 
MiniCAD

VectorScript Declaration:

PROCEDURE   GetLine
( VAR  p1X :REAL;
  VAR  p1Y :REAL;
  VAR  p2X :REAL;
  VAR  p2Y :REAL
) ;

Python:

def  vs.GetLine():
   return (p1, p2)

Description:

Procedure GetLine returns two user selected points, and draws a temporary "rubberband" line when prompting for the second point. This cannot be used if there is a function anywhere in the calling chain.

説明

マウスで2点を指示されるまで待機し、始点と終点の座標を返します。

Parameters:

p1 Returns coordinates of first user click. 始点の座標
p2 Returns coordinates of second user click. 終点の座標



  GetLine3D User Interactive 
Vectorworks 2010

VectorScript Declaration:

PROCEDURE   GetLine3D
( VAR  p1X :REAL;
  VAR  p1Y :REAL;
  VAR  p1Z :REAL;
  VAR  p2X :REAL;
  VAR  p2Y :REAL;
  VAR  p2Z :REAL;
    useWP :BOOLEAN
) ;

Python:

def  vs.GetLine3D(useWP):
   return (p1, p2)

Description:

Procedure GetLine3D returns two user selected points, and draws a temporary "rubberband" 3D line when prompting for the second point. This cannot be used if there is a function anywhere in the calling chain.

説明

マウスで2点を指示されるまで待機し、始点と終点の3D座標を返します。

Parameters:

p1 Returns coordinates of first user click. 始点の座標
p2 Returns coordinates of second user click. 終点の座標
useWP TRUE if the returned point have to be on the active Working Plane. Snapping to arbitrary 3D geometry will produce vertical projection result on the WP; FALSE if the point can be arbitrary 3D point (produced, for example, by snapping to a 3D geometry) TRUE現在のワーキングプレーン上に点がおかれます。任意の3D図形にスナップした場合はワーキングプレーンに鉛直に投影されます。FALSE任意の3Dの点(例えば3D図形にスナップして作図する場合)

See Also:

GetPt   GetPtL   GetLine   GetRect   GetPt3D   GetPtL3D   GetLine3D   GetRect3D  



  GetMouse User Interactive 
MiniCAD

VectorScript Declaration:

PROCEDURE   GetMouse
( VAR  pX :REAL;
  VAR  pY :REAL
) ;

Python:

def  vs.GetMouse():
   return p

Description:

Procedure GetMouse tracks and returns the current location of the cursor within the active Vectorworks document, allowing the cursor coordinates to be returned dynamically while moving the cursor onscreen.

説明

現在のマウスの座標を返します。

Parameters:

p Returns current mouse coordinates. 座標

Example:

BEGIN
     WHILE NOT KeyDown(aCode) DO
     BEGIN
           GetMouse(CursX,CursY);
           Message('X : ',CursX,' Y : ',CursY);
     END;
END;
{displays the cursor coordinates as it is moved around onscreen}



  GetPt User Interactive 
MiniCAD

VectorScript Declaration:

PROCEDURE   GetPt
( VAR  pX :REAL;
  VAR  pY :REAL
) ;

Python:

def  vs.GetPt():
   return p

Description:

Procedure GetPt switches the cursor to selection mode and allows the user to select a point in a Vectorworks document. This cannot be used if there is a function anywhere in the calling chain.

説明

マウスがクリックされるまで待機し、クリックされた点の座標を返します。

Parameters:

p Returns coordinates of mouse click. 座標

Example:

PROCEDURE Example;
VAR
	pt :POINT;
BEGIN
	GetPt(pt.x, pt.y);
	Message(pt);
END;
RUN(Example);



  GetPt3D User Interactive 
Vectorworks 2010

VectorScript Declaration:

PROCEDURE   GetPt3D
( VAR  pX :REAL;
  VAR  pY :REAL;
  VAR  pZ :REAL;
    useWPOnly :BOOLEAN
) ;

Python:

def  vs.GetPt3D(useWPOnly):
   return p

Description:

Procedure GetPt3D switches the cursor to 3D selection mode and allows the user to select a point in a VectorWorks document. This cannot be used if there is a function anywhere in the calling chain.

説明

マウスがクリックされるまで待機し、クリックされた点の3D座標を返します。

Parameters:

p Returns coordinates of mouse click. 座標
useWPOnly TRUE if the returned point have to be on the active Working Plane. Snapping to arbitrary 3D geometry will produce vertical projection result on the WP; FALSE if the point can be arbitrary 3D point (produced, for example, by snapping to a 3D geometry) TRUE現在のワーキングプレーン上に点がおかれます。任意の3D図形にスナップした場合はワーキングプレーンに鉛直に投影されます。FALSE任意の3Dの点(例えば3D図形にスナップして作図する場合)

See Also:

GetPt   GetPtL   GetLine   GetRect   GetPt3D   GetPtL3D   GetLine3D   GetRect3D  



  GetPtL User Interactive 
MiniCAD

VectorScript Declaration:

PROCEDURE   GetPtL
(   p1X :REAL;
    p1Y :REAL;
  VAR  p2X :REAL;
  VAR  p2Y :REAL
) ;

Python:

def  vs.GetPtL(p1):
   return p2

Description:

Procedure GetPtL creates a temporary "rubberband" line from a specified point to the user selected end point. This cannot be used if there is a function anywhere in the calling chain.

説明

指定した始点から直線が描かれ、マウスで終点が指示されるまで待機します。

Parameters:

p1 Coordinates of line start point. 始点の座標
p2 Returns coordinates of mouse click. 終点の座標

Example:

PROCEDURE Example;
VAR
	pt1, pt2 :VECTOR;
BEGIN
	GetPt(pt1.x, pt1.y);
	GetPtL(pt1.x, pt1.y, pt2.x, pt2.y);
	MoveTo(pt1.x, pt1.y);
	LineTo(pt2.x, pt2.y);
END;
RUN(Example);



  GetPtL3D User Interactive 
Vectorworks 2010

VectorScript Declaration:

PROCEDURE   GetPtL3D
(   p1X :REAL;
    p1Y :REAL;
    p1Z :REAL;
  VAR  p2X :REAL;
  VAR  p2Y :REAL;
  VAR  p2Z :REAL;
    useWPOnly :BOOLEAN
) ;

Python:

def  vs.GetPtL3D(p1, useWPOnly):
   return p2

Description:

Procedure GetPtL3D creates a temporary "rubberband" 3D line from a specified point to the user selected end point. This cannot be used if there is a function anywhere in the calling chain.

説明

指定した始点から3D線分のラバーバンドが描かれ、マウスで終点が指示されるまで待機します。

Parameters:

p1 Coordinates of line start point. 始点座標
p2 Returns coordinates of mouse click. 終点座標
useWPOnly TRUE if the returned point have to be on the active Working Plane. Snapping to arbitrary 3D geometry will produce vertical projection result on the WP; FALSE if the point can be arbitrary 3D point (produced, for example, by snapping to a 3D geometry) TRUE現在のワーキングプレーン上に点がおかれます。任意の3D図形にスナップした場合はワーキングプレーンに鉛直に投影されます。FALSE任意の3Dの点(例えば3D図形にスナップして作図する場合)

See Also:

GetPt   GetPtL   GetLine   GetRect   GetPt3D   GetPtL3D   GetLine3D   GetRect3D  



  GetRect User Interactive 
MiniCAD

VectorScript Declaration:

PROCEDURE   GetRect
( VAR  p1X :REAL;
  VAR  p1Y :REAL;
  VAR  p2X :REAL;
  VAR  p2Y :REAL
) ;

Python:

def  vs.GetRect():
   return (p1, p2)

Description:

Procedure GetRect draws a temporary "rubberband" rectangle onscreen, similar to a selection marquee. The user defines the rectangle by selecting two points which define the top left and bottom right of the rectangle. This cannot be used if there is a function anywhere in the calling chain.

説明

マウスで四角形の座標を指示されるまで待機し、四角形の座標を返します。

Parameters:

p1 Returns coordinates of first user click. 左上の座標
p2 Returns coordinates of second user click. 右下の座標



  GetRect3D User Interactive 
Vectorworks 2010

VectorScript Declaration:

PROCEDURE   GetRect3D
( VAR  p1X :REAL;
  VAR  p1Y :REAL;
  VAR  p1Z :REAL;
  VAR  p2X :REAL;
  VAR  p2Y :REAL;
  VAR  p2Z :REAL;
    useWP :BOOLEAN
) ;

Python:

def  vs.GetRect3D(useWP):
   return (p1, p2)

Description:

Procedure GetRect3D draws a temporary "rubberband" 3D rectangle on the working plane. The user defines the rectangle by selecting two points which define the top left and bottom right of the rectangle. This cannot be used if there is a function anywhere in the calling chain.

説明

マウスで四角形の座標を指示されるまで待機し、四角形の3D座標を返します。

Parameters:

p1 Returns coordinates of first user click. 始点の座標
p2 Returns coordinates of second user click. 終点の座標
useWP TRUE if the returned point have to be on the active Working Plane. Snapping to arbitrary 3D geometry will produce vertical projection result on the WP; FALSE if the point can be arbitrary 3D point (produced, for example, by snapping to a 3D geometry) TRUE現在のワーキングプレーン上に点がおかれます。任意の3D図形にスナップした場合はワーキングプレーンに鉛直に投影されます。FALSE任意の3Dの点(例えば3D図形にスナップして作図する場合)

See Also:

GetPt   GetPtL   GetLine   GetRect   GetPt3D   GetPtL3D   GetLine3D   GetRect3D  



  KeyDown User Interactive 
MiniCAD

VectorScript Declaration:

FUNCTION   KeyDown
VAR asciiCode:LONGINT ) :BOOLEAN ;

Python:

def  vs.KeyDown():
   return (BOOLEAN, asciiCode)

Description:

Function KeyDown returns TRUE if a non-modifier keyboard character has been depressed. When TRUE is returned, the ASCII code of the character is returned.

Modifier keys are the Caps Lock, Command, Control, Option, and Shift keys.

説明

ファンクションキー以外のキーが押された場合、TRUEを返すと同時に押されたキーのASCIIコードを返します。

Parameters:

asciiCode ASCII code of key pressed. 押されたキーのASCIIコード

返り値

キーが押されていればTRUE

Example:

WHILE NOT KeyDown(keyHit) DO
BEGIN
     SysBeep;
     SysBeep;
END;
Message('The key pressed was ',keyHit);
{an annoying example of one use of the KeyDown function}



  MouseDown User Interactive 
MiniCAD

VectorScript Declaration:

FUNCTION   MouseDown
( VAR  pX :REAL;
  VAR  pY :REAL
) :BOOLEAN ;

Python:

def  vs.MouseDown():
   return (BOOLEAN, p)

Description:

Function MouseDown returns TRUE if a mouse down event has occurred within the active document window.

説明

マウスボタンが押されている場合は、TRUEと座標を返します。

Parameters:

p Returns coordinates of mouse click. マウスの座標

返り値

マウスボタンが押されていればTRUE

Example:

REPEAT
UNTIL MouseDown(x1,y1);
REPEAT
UNTIL MouseDown(x2,y2);
MoveTo(x1,y1);
LineTo(x2,y2);



  Option User Interactive 
MiniCAD

VectorScript Declaration:

FUNCTION   Option
:BOOLEAN ;

Python:

def  vs.Option():
   return BOOLEAN

Description:

Option return TRUE if the Option key (Mac) or Alt key (Windows) was depressed during the last user event. This function operates with the MouseDown, KeyDown, AutoKey, GetPt, GetPtL, GetLine, and GetRect calls.

説明

MacではOptionキー、WindowsではAltキーが押されている場合は、TRUEを返します。

返り値

Optionキーが押されていればTRUE

See Also:

MouseDown   KeyDown   AutoKey  



  RunTempTool User Interactive 
Vectorworks 2010

VectorScript Declaration:

PROCEDURE   RunTempTool
(   toolCallback :PROCEDURE;
    initialScroll :BOOLEAN
) ;

Python:

def  vs.RunTempTool(toolCallback, initialScroll):
   return None

Description:

Runs a temp tool. The call waits until the tool has finished. The callback function is notified for the tool events.

説明

テンポラリツール関数を呼ぶ。ツール関数が終了するまで待機します。コールバック関数へはツールイベントが通知されます。

Parameters:

toolCallback Procedure that will be called with the tool events. FUNCTION ToolCallback(action, msg1, msg2 : INTEGER) : INTEGER; ツールイベントで呼ばれる手続き
FUNCTION ToolCallback(action, msg1, msg2 : INTEGER) : INTEGER;
initialScroll For experts. Pass FALSE if you want a simple temp tool. Setting it to TRUE will add one extra point (0,0) before the tool runs. This will make the tool scroll before the first click. This means that your tool handler must recognize and skip that extra fir 上級者向け。FALSE:単純なテンポラリーツール TRUE:ツールを実行する前に原点(0,0)にひとつ点を追加されます。これにより最初のクリックの前にスクロールされます。よってツールハンドラでこの点を認識してスキップする必要がある。

Example:

PROCEDURE Test;
VAR
    pt1, pt2 : POINT;

    FUNCTION TempToolCallback(action, msg1, msg2 : LONGINT) : LONGINT;
    VAR pt : POINT;
    BEGIN
         TempToolCallback := 0;
         CASE action OF
             3: BEGIN {kOnToolDoSetupEventID}
		             vstSetHelpString ( 'Just click once.' );
             END;

             103 : BEGIN {kToolDrawEventID}
                 vstGetCurrPt2D( pt.x, pt.y );
                 vstDrawCoordLine( pt.x, pt.y, pt1.x, pt1.y );
                 vstDrawCoordLine( pt.x, pt.y, pt2.x, pt2.y );
             END;
         END;
    END;

BEGIN
    pt1.x := 0; pt1.y := 0;
    pt2.x := 100mm; pt2.y := 100mm;
    RunTempTool( TempToolCallback, FALSE );
END;
RUN( Test );



  SetCursor User Interactive 
MiniCAD

VectorScript Declaration:

PROCEDURE   SetCursor
( cursor:INTEGER ) ;

Python:

def  vs.SetCursor(cursor):
   return None

Description:

Procedure SetCursor changes the appearance of the screen cursor.

Table - Cursor Styles

Cursor Style Style Flag
Large Cross LgCrossC
Small Cross SmCrossC
Watch WatchC
Text Bar TextBarC
Arrow ArrowC
Hand HandC

説明

カーソルの形状を設定します。

Parameters:

cursor Cursor style setting. カーソルの種類

Example:

SetCursor(LgCrossC);



  SetModeButtonText User Interactive 
Vectorworks 2013

VectorScript Declaration:

PROCEDURE   SetModeButtonText
(   modeName :STRING;
    modeType :INTEGER
) ;

Python:

def  vs.SetModeButtonText(modeName, modeType):
   return None

Description:

Sets a mode bar button help text.

説明

モードバーボタンのヘルプテキストを設定します。

Parameters:

modeName The name of the mode. モードの名前
modeType The type of the mode. Types: RadioMode = 0, ButtonMode = 1, PrefButtonMode = 2, CheckMode = 3, EditTextMode = 4, PullDownMode = 5 モードのタイプ
0 : ラジオ 1 : ボタン 2 : 設定ボタン 3 : チェック 4 : 編集可能テキスト 5 : プルダウン

Example:

BeginModeButtonsText;
SetModeButtonText( 'Mode1', 1 );
SetModeButtonText( 'Mode2', 0 );
EndModeButtonsText;

See Also:

BeginModeButtonsText   EndModeButtonsText  



  SetTempToolHelpStr User Interactive 
Vectorworks 2010

VectorScript Declaration:

PROCEDURE   SetTempToolHelpStr
( helpString:STRING ) ;

Python:

def  vs.SetTempToolHelpStr(helpString):
   return None

Description:

Sets a text to be used as help string for temp tool calls: RunTempTool, TrackObject, GetPt, GetPtL, GetPt3D, and GetPtL3D.

This function should be called prior to calling the tool.

The help string will be used for subsequent temp tool runs until changed.

説明

テンポラリツール関数のヘルプを設定します。

この関数はツールが呼ばれる前に呼ばれる必要がある。

ヘルプ文字列は変更されるまで以降のテンポラリーツールが実行されるたびに使われます。

Parameters:

helpString The help string for the next temp tool. 次のテンポラリーツールのためのヘルプ文字列

Example:

PROCEDURE Test;
VAR h : HANDLE;
  
  FUNCTION CheckObjCallback(h : HANDLE) : BOOLEAN;
  BEGIN
     {any object is ok}
     CheckObjCallback := true;
  END;

BEGIN
SetTempToolHelpStr( 'Select any object' );
TrackObject( CheckObjCallback, h );
SetSelect( h );
END;
RUN( Test );



  SetToolHelpMessage User Interactive 
Vectorworks 2013

VectorScript Declaration:

PROCEDURE   SetToolHelpMessage
(   modeText :STRING;
    descriptionText :STRING
) ;

Python:

def  vs.SetToolHelpMessage(modeText, descriptionText):
   return None

Description:

Sets the Tool Bar Help Text by new standard - Tool Name[: Tool Mode][. Brief usage advice.].

説明

ツールバーのヘルプテキストを新しい標準形式(ツールモード, 使い方のアドバイス)で設定します。

Parameters:

modeText The text that will be showed like as a name of the mode. ツールモード
descriptionText The text that will be showed like as an advice text. 使い方のアドバイス



  Shift User Interactive 
MiniCAD

VectorScript Declaration:

FUNCTION   Shift
:BOOLEAN ;

Python:

def  vs.Shift():
   return BOOLEAN

Description:

Shift returns TRUE if the Shift key was depressed during the last user event. This function operates with the MouseDown, KeyDown, AutoKey, GetPt, GetPtL, GetLine, and GetRect calls.

説明

Shiftキーが押されている場合は、TRUEを返します。

返り値

Shiftキーが押されていればTRUE



  TrackObject User Interactive 
Vectorworks 2010

VectorScript Declaration:

PROCEDURE   TrackObject
(   callback :PROCEDURE;
  VAR  outObj :HANDLE;
  VAR  pX :REAL;
  VAR  pY :REAL;
  VAR  pZ :REAL
) ;

Python:

def  vs.TrackObject(callback):
   return (outObj, p)

Description:

Interactively, including highlighting, allows the user to select one object meeting the specified criteria.

The callback function (any of these depending on what info is needed):

FUNCTION Callback(h : HANDLE): BOOLEAN;
FUNCTION CheckObjCallback(h : HANDLE; px, py : REAL) : BOOLEAN;
FUNCTION CheckObjCallback(h : HANDLE; px, py, pz : REAL) : BOOLEAN;

is used to let the user filter the object that can be returned from the function.

The parameteri px,py,pz pass into the function information about current cursor position in document units.

This callback function is called when tracking over an object; also when click happens over an object.

The callback function return true if the passed handle can be returned.

説明

インタラクティブに条件に合致するオブジェクトを選択します。

コールバック関数 (目的に応じて次のいずれか):

FUNCTION Callback(h : HANDLE): BOOLEAN;
FUNCTION CheckObjCallback(h : HANDLE; px, py : REAL) : BOOLEAN;
FUNCTION CheckObjCallback(h : HANDLE; px, py, pz : REAL) : BOOLEAN;

を使ってこの関数から返すオブジェクトを選択することができる。

パラメータの px,py,pz には書類の単位でカーソル位置が渡される

コールバック関数は図形の上を通過したり、クリックしたりすると呼ばれる


コールバック関数は渡されたハンドルを返す時にTRUEを返します

Parameters:

callback The callback that will be called to check if an object meets the requrements to be tracked. See remarks. マウスの動きに追従する必要があるとうか判断するためコールバック関数
outObj Returns handle of the object for which the callback returned TRUE. コールバック関数がTRUEを返した図形のハンドル
p Returns coordinates of mouse click. マウスクリックの座標を返します

Example:

PROCEDURE Test;
VAR
  h : HANDLE;
  x, y, z : REAL;
  
  FUNCTION CheckObjCallback(h : HANDLE) : BOOLEAN;
  {or FUNCTION CheckObjCallback(h : HANDLE; px, py : REAL) : BOOLEAN;}
  {or FUNCTION CheckObjCallback(h : HANDLE; px, py, pz : REAL) : BOOLEAN;}
  BEGIN
     {any object is ok}
     CheckObjCallback := true;
  END;

BEGIN
	TrackObject( CheckObjCallback, h, x, y, z );
	SetSelect( h );
END;
RUN( Test );



  TrackObjectN User Interactive 
Vectorworks 2014

VectorScript Declaration:

PROCEDURE   TrackObjectN
(   traverseType :INTEGER;
    callback :PROCEDURE;
  VAR  outObj :HANDLE;
  VAR  pX :REAL;
  VAR  pY :REAL;
  VAR  pZ :REAL
) ;

Python:

def  vs.TrackObjectN(traverseType, callback):
   return (outObj, p)

Description:

Interactively, including highlighting, allows the user to select one object meeting the specified criteria.

The callback function (any of these depending on what info is needed):

FUNCTION Callback(h : HANDLE): BOOLEAN;
FUNCTION CheckObjCallback(h : HANDLE; px, py : REAL) : BOOLEAN;
FUNCTION CheckObjCallback(h : HANDLE; px, py, pz : REAL) : BOOLEAN;

is used to let the user filter the object that can be returned from the function.

The parameteri px,py,pz pass into the function information about current cursor position in document units.

This callback function is called when tracking over an object; also when click happens over an object.

The callback function return true if the passed handle can be returned.

説明

インタラクティブに(ハイライトさせながら)条件に合致したオブジェクトを選択します。

コールバック関数 (目的に応じて次のいずれか):

FUNCTION Callback(h : HANDLE): BOOLEAN;
FUNCTION CheckObjCallback(h : HANDLE; px, py : REAL) : BOOLEAN;
FUNCTION CheckObjCallback(h : HANDLE; px, py, pz : REAL) : BOOLEAN;

を使ってこの関数から返すオブジェクトを選択することができる。

]パラメータの px,py,pz には書類の単位でカーソル位置が渡される

コールバック関数は図形の上を通過したり、クリックしたりすると呼ばれる

コールバック関数は渡されたハンドルを返す時にTRUEを返します

Parameters:

traverseType Specify how to traverse the drawing. 0 - traverses only the high-level objects (the same as the TrakcObject function); 1 - traverses the objects deep (uses GetPickObjectInfo, the 'subH' parameter). 2 - traverses the objects shallow (uses GetPickObjectInfo 書類をどのようにたどるか指定します。 0 - 一番高レベルのオブジェクトだけをたどる (TrakcObject 関数と同様); 1 - 深いレベルのオブジェクトもたどる (GetPickObjectInfo、'subH' パラメータを使う。); 2 - 浅いレベルのオブジェクトをたどる (GetPickObjectInfoを使う。)
callback The callback that will be called to check if an object meets the requrements to be tracked. See remarks. マウスの動きに追従する必要があるとうか判断するためコールバック関数
outObj Returns handle of the object for which the callback returned TRUE. コールバック関数がTRUEを返した図形のハンドル
p Returns coordinates of mouse click. マウスクリックの座標を返します

Example:

PROCEDURE Test;
VAR
  h : HANDLE;
  x, y, z : REAL;
  
  FUNCTION CheckObjCallback(h : HANDLE) : BOOLEAN;
  {or FUNCTION CheckObjCallback(h : HANDLE; px, py : REAL) : BOOLEAN;}
  {or FUNCTION CheckObjCallback(h : HANDLE; px, py, pz : REAL) : BOOLEAN;}
  BEGIN
     {any object is ok}
     CheckObjCallback := true;
  END;

BEGIN
	TrackObjectN( 0, CheckObjCallback, h, x, y, z );
	SetSelect( h );
END;
RUN( Test );

See Also:

TrackObject   GetPickObjectInfo