AddResourceToList Document List Handling 
VectorWorks12.0

VectorScript Declaration:

FUNCTION   AddResourceToList
(   listID :LONGINT;
    resource :HANDLE
) :LONGINT ;

Python:

def  vs.AddResourceToList(listID, resource):
   return LONGINT

Description:

Adds the indicated resource to the specified resource list, if it is of the same type as the items already in the list. Returns the index of the resource in the list or 0.

説明

指定したリソースリストにリソースを追加します。リスト内の番号、または0を返します。

Parameters:

listID an ID for a resource list created by the BuildResourceList command. BuildResourceListコマンドで作成されたリソースリストの番号
resource a resource to add to the resource list. リソースリストに加えるリソースのハンドル

Example:

{ Create a new hatch and add it to the resource list. }
hatchName := 'Hatch-1';
BeginVectorFillN(hatchName, true, false, 0);
AddVectorFillLayer(0, 0, 1, 1, .25, -.25, .7, 3, 255);
EndVectorFill;
newHatch := GetObject(hatchName);
index := AddResourceToList(listID, newHatch);



  BeginFolder Document List Handling 
MiniCAD

VectorScript Declaration:

PROCEDURE   BeginFolder
;

Python:

def  vs.BeginFolder():
   return None

Description:

Procedure BeginFolder creates a new symbol folder in a Vectorworks document. Any symbols or symbol folders created after the current call to BeginFolder will be nested inside the new symbol folder. A call to EndFolder will complete the creation of the symbol folder, which is then generated in the Vectorworks document.

To name the new symbol folder, precede BeginFolder with a call to NameObject.

説明

この手続きを実行した後、EndFolderを実行するまでの間に作成されたシンボルをシンボルフォルダに入れます。シンボルフォルダの名前は、この手続きの直前にNameObjectを実行して設定します。

Example:

NameObject('Object Symbols');
BeginFolder;
  BeginSym('Oval Symbols');
    PenSize(14);
    PenPat(2);
    FillPat(1);
    FillFore(0,0,0);
    FillBack(65535,65535,65535);
    PenFore(0,0,0);
    PenBack(65535,65535,65535);
    Oval(-1/4",1/4",3/4",-3/4");
  EndSym;
EndFolder;
{creates the symbol folder 'Object Symbols', which contains a symbol}



  BeginFolderN Document List Handling 
Vectorworks 2018

VectorScript Declaration:

PROCEDURE   BeginFolderN
( type:INTEGER ) ;

Python:

def  vs.BeginFolderN(type):
   return None

Description:

Procedure BeginFolderN creates a new resource folder of the indicated type in a Vectorworks document. Any resource or folder of that type created after the current call to BeginFolderN will be nested inside the new folder. A call to EndFolder will complete the creation of the folder, which is then generated in the Vectorworks document.

To name the new folder, precede BeginFolderN with a call to NameObject.

説明

指定したリソースタイプの新規のリソースフォルダを作成します。この手続きを実行した後、EndFolderを実行するまでの間に作成されたリソース/リソースフォルダはこのフォルダに入ります。

フォルダの名前は、この手続きの直前に NameObject を実行して設定します。

Parameters:

type the type of resource the folder will contain フォルダに入れるリソースの種類の番号

Example:

const
kSymbolDefinitions = 16;
NameObject('Object Symbols');
BeginFolder(kSymbolDefinitions);
  BeginSym('Oval Symbols');
    PenSize(14);
    PenPat(2);
    FillPat(1);
    FillFore(0,0,0);
    FillBack(65535,65535,65535);
    PenFore(0,0,0);
    PenBack(65535,65535,65535);
    Oval(-1/4",1/4",3/4",-3/4");
  EndSym;
EndFolder;
{creates the symbol folder 'Object Symbols', which contains a symbol}



  BuildResourceList Document List Handling 
VectorWorks12.0

VectorScript Declaration:

FUNCTION   BuildResourceList
(   type :INTEGER;
    folderIndex :INTEGER;
    subFolderName :DYNARRAY[] of CHAR;
  VAR  numItems :LONGINT
) :LONGINT ;

Python:

def  vs.BuildResourceList(type, folderIndex, subFolderName):
   return (LONGINT, numItems)

Description:

Creates an implicit list of resources of a specified type, and returns an ID for the list. Values in the list can be retrieved using GetNameFromResourceList.

If the Display Default Content preference (#130) is on and folderIndex is not 0, it will also include all the resources of the specified type in all the files in the selected folder.

If folderIndex is positive, the list will include all the resources of that type from the current document, as well as from the specified folder. If folderIndex is 0, only the resources in the current document will be in the list. If folderIndex is negative, only the resources in the specified folder will be in the list.

A complete listing of supported object types may be found in the Appendix.

Table - Folder Path Selectors

Note that use of the negative values of these constants can be used to get the user-based folder path. The positive values are for application-based paths, which should not be used for writing.

Folder Name Constant
Application 1
Plug-Ins 2
Workspaces 4
Templates 7
Standards 8
Help 9
Dictionaries 10
User App Data 12
Libraries 13
Defaults 14
Settings 15
PDF Resources 18
Plug-In Data 20
Plug-In Includes 21
Plug-In interfaces 22
Favorites 23
Renderworks - Textures 100
Cabinet - Handles 101
Door - Hardware 102
Attributes - Gradients 103
Hardscape - Hatches 104
Attributes - Hatches 105
Attributes - Image Fills 106
Plants 107
Toilet Stall - Fixtures 108
RenderWorks - Backgrounds 109
Seating Layout - Symbols 110
Tile - Symbols 111
Human Figure - Textures 112
Walls 113
Stairs 114
Drawing Border - Title Blocks 115
Section - Markers 116
Repetitive Unit 117
Door - Custom Leaves 118
Lighting Instrument - Gobos 119
Reports~Schedules 120
Lighting Instrument - Symbols 121
Plants - Hatches 124
Repetitive Unit: Flooring/Decking 125
Repetitive Unit: Framing 126
Repetitive Unit: Masonry Units 127
Repetitive Unit: Miscellaneous 128
Repetitive Unit: Roofing 129
Repetitive Unit: Siding 130
Walls - Hatches 131
Walls - Textures 132
Window - Custom Shutters 133
Sketch Styles 134
Plant Database 135
VW Plants 136
Color Palettes 137
Framing Member - Custom Profile 138
Spaces - Occupant Organization Name Lists 140
Spaces - Space Name Lists and Libraries 141
Structural Shapes 142

説明

指定した種類のリソースリストを作成して、リソースリストの番号を返します。リソースリスト内の値は、GetNameFromResourceListを使って取得することができます。

環境設定-標準リソースを表示 (#130) にチェックが入っていて、folderIndexパラメータの値が0でない場合、指定したフォルダ内にあるすべてのドキュメントに含まれる指定した種類のリソースすべてを含みます。

folderIndexパラメータの値が正の数の場合、アクティブなドキュメントと指定したフォルダ内にあるすべてのドキュメントに含まれる指定した種類のリソースがリソースリストに含まれます。

folderIndexパラメータの値が0の場合、アクティブなドキュメントにある指定した種類のリソースがリソースリストに含まれます。

folderIndexパラメータの値が負の数の場合、指定したフォルダ内にあるすべてのドキュメントに含まれる指定した種類のリソースがリソースリストに含まれます。

Parameters:

type the type of resource to put in the list リソースリストに入れるリソースの種類の番号
folderIndex the index of a VW folder. フォルダの番号
subFolderName the name of a subfolder inside the folder specified by folderIndex. This can also be a partial path. Use an empty string to request the resources from all files in the folderIndex folder. folderIndexによって指定されるフォルダ内のサブフォルダの名前
folderIndexフォルダ(サブフォルダ内も含む)にあるすべてのファイルからリソースを取得するには、空文字列を指定します。
numItems the number of items in the list built リソースリスト内のリソースの数

Example:

const
kHatch = 66;
kDefHatchFolder = 105;
var
listID, numItems: LONGINT;
begin
{ Create a resource list of hatches from the current document and } 
{ the default hatch folder. }
listID := BuildResourceList(kHatch, kDefHatchFolder, '', numItems);

See Also:

AddResourceToList   DeleteResourceFromList   GetNameFromResourceList   GetResourceFromList   ImportResourceToCurrentFile  



  BuildResourceList2 Document List Handling 
Vectorworks 2014

VectorScript Declaration:

FUNCTION   BuildResourceList2
(   type :INTEGER;
    folderIndex :INTEGER;
    subFolderName :DYNARRAY[] of CHAR;
  VAR  numItems :LONGINT;
    useDefaultContent :BOOLEAN
) :LONGINT ;

Python:

def  vs.BuildResourceList2(type, folderIndex, subFolderName, useDefaultContent):
   return (LONGINT, numItems)

Description:

Creates an implicit list of resources of a specified type, and returns an ID for the list. Values in the list can be retrieved using GetNameFromResourceList.

If the Display Default Content preference (#130) is on and folderIndex is not 0, it will also include all the resources of the specified type in all the files in the selected folder.

If folderIndex is positive, the list will include all the resources of that type from the current document, as well as from the specified folder. If folderIndex is 0, only the resources in the current document will be in the list. If folderIndex is negative, only the resources in the specified folder will be in the list.

A complete listing of supported object types may be found in the Appendix.

Table - Folder Path Selectors

Note that use of the negative values of these constants can be used to get the user-based folder path. The positive values are for application-based paths, which should not be used for writing.

Folder Name Constant
Application 1
Plug-Ins 2
Workspaces 4
Templates 7
Standards 8
Help 9
Dictionaries 10
User App Data 12
Libraries 13
Defaults 14
Settings 15
PDF Resources 18
Plug-In Data 20
Plug-In Includes 21
Plug-In interfaces 22
Favorites 23
Renderworks - Textures 100
Cabinet - Handles 101
Door - Hardware 102
Attributes - Gradients 103
Hardscape - Hatches 104
Attributes - Hatches 105
Attributes - Image Fills 106
Plants 107
Toilet Stall - Fixtures 108
RenderWorks - Backgrounds 109
Seating Layout - Symbols 110
Tile - Symbols 111
Human Figure - Textures 112
Walls 113
Stairs 114
Drawing Border - Title Blocks 115
Section - Markers 116
Repetitive Unit 117
Door - Custom Leaves 118
Lighting Instrument - Gobos 119
Reports~Schedules 120
Lighting Instrument - Symbols 121
Plants - Hatches 124
Repetitive Unit: Flooring/Decking 125
Repetitive Unit: Framing 126
Repetitive Unit: Masonry Units 127
Repetitive Unit: Miscellaneous 128
Repetitive Unit: Roofing 129
Repetitive Unit: Siding 130
Walls - Hatches 131
Walls - Textures 132
Window - Custom Shutters 133
Sketch Styles 134
Plant Database 135
VW Plants 136
Color Palettes 137
Framing Member - Custom Profile 138
Spaces - Occupant Organization Name Lists 140
Spaces - Space Name Lists and Libraries 141
Structural Shapes 142

説明

指定した種類のリソースリストを作成して、リソースリストの番号を返します。リソースリスト内の値は、GetNameFromResourceListを使って取得することができます。

環境設定-標準リソースを表示 (#130) にチェックが入っていて、folderIndexパラメータの値が0でない場合、指定したフォルダ内にあるすべてのドキュメントに含まれる指定した種類のリソースすべてを含みます。

folderIndexパラメータの値が正の数の場合、アクティブなドキュメントと指定したフォルダ内にあるすべてのドキュメントに含まれる指定した種類のリソースがリソースリストに含まれます。

folderIndexパラメータの値が0の場合、アクティブなドキュメントにある指定した種類のリソースがリソースリストに含まれます。

folderIndexパラメータの値が負の数の場合、指定したフォルダ内にあるすべてのドキュメントに含まれる指定した種類のリソースがリソースリストに含まれます。

Parameters:

type the type of resource to put in the list リソースリストに入れるリソースの種類の番号
folderIndex the index of a VW folder. フォルダの番号
subFolderName the name of a subfolder inside the folder specified by folderIndex. This can also be a partial path. Use an empty string to request the resources from all files in the folderIndex folder. folderIndexによって指定されるフォルダ内のサブフォルダの名前。部分パスも可。folderIndexフォルダ(サブフォルダ内も含む)にあるすべてのファイルからリソースを取得するには、空文字列を指定します。
numItems the number of items in the list built リソースリスト内のリソースの数
useDefaultContent determine if the list should contain default content 標準リソースをリストに含むかどうか

See Also:

BuildResourceList   BuildResourceListN   BuildResourceListN2   AddResourceToList   DeleteResourceFromList   GetNameFromResourceList   GetResourceFromList   ImportResourceToCurrentFile  



  BuildResourceListN Document List Handling 
Vectorworks 2013

VectorScript Declaration:

FUNCTION   BuildResourceListN
(   type :INTEGER;
    fullPath :DYNARRAY[] of CHAR;
  VAR  numItems :LONGINT
) :LONGINT ;

Python:

def  vs.BuildResourceListN(type, fullPath):
   return (LONGINT, numItems)

Description:

Build a resource list from the specified file.

説明

指定したファイルからリソースのリストを作成します。

Parameters:

type the type of resource to put in the list リソースリストに入れるリソースの種類の番号
fullPath The path to the file that provides the resources. リソースのあるファイルパス
numItems the number of items in the list built リソースリスト内のリソースの数

See Also:

BuildResourceList  



  BuildResourceListN2 Document List Handling 
Vectorworks 2014

VectorScript Declaration:

FUNCTION   BuildResourceListN2
(   type :INTEGER;
    fullPath :DYNARRAY[] of CHAR;
  VAR  numItems :LONGINT;
    useDefaultContent :BOOLEAN
) :LONGINT ;

Python:

def  vs.BuildResourceListN2(type, fullPath, useDefaultContent):
   return (LONGINT, numItems)

Description:

Build a resource list from the specified file.

説明

指定したファイルからリソースのリストを作成します。

Parameters:

type the type of resource to put in the list リソースリストに入れるリソースの種類の番号
fullPath The path to the file that provides the resources. リソースのあるファイルパス
numItems the number of items in the list built リソースリスト内のリソースの数
useDefaultContent determine if the list should contain default content 標準リソースをリストに含むかどうか

See Also:

BuildResourceListN   BuildResourceList   BuildResourceList2  



  DeleteResourceFromList Document List Handling 
VectorWorks12.0

VectorScript Declaration:

PROCEDURE   DeleteResourceFromList
(   listID :LONGINT;
    index :LONGINT
) ;

Python:

def  vs.DeleteResourceFromList(listID, index):
   return None

Description:

Deletes the indicated object in the specified resource list.

説明

指定したリソースリストから指定した番号の図形を削除します。

Parameters:

listID an ID for a resource list created by the BuildResourceList function. BuildResourceListコマンドで作成されたリソースリストの番号
index an index into the list. リソースリスト内の番号

Example:

hatchName := GetNameFromResourceList(listID, index);
if (pos('P', hatchName) = 1) then
	DeleteResourceFromList(listID, index)



  EndFolder Document List Handling 
MiniCAD

VectorScript Declaration:

PROCEDURE   EndFolder
;

Python:

def  vs.EndFolder():
   return None

Description:

Procedure EndFolder completes symbol folder creation in VectorScript. When EndFolder is called, the any procedure calls defined since a call to BeginFolder are used to create symbols and/or symbol folders.

説明

BeginFolderを実行した後、この手続きを実行するまでの間に作成されたシンボルをシンボルフォルダに入れます。



  FActLayer Document List Handling 
MiniCAD

VectorScript Declaration:

FUNCTION   FActLayer
:HANDLE ;

Python:

def  vs.FActLayer():
   return HANDLE

Description:

Function FActLayer returns a handle to the first object on the active layer. If the object does not exist, the function returns NIL.

説明

アクティブなレイヤ上にある最上位の図形のハンドルを返します。図形が存在しない場合はNILを返します。



  FIn3D Document List Handling 
MiniCAD

VectorScript Declaration:

FUNCTION   FIn3D
( objectHd:HANDLE ) :HANDLE ;

Python:

def  vs.FIn3D(objectHd):
   return HANDLE

Description:

Function FIn3D returns a handle to the first component object in the referenced 3D object definition.

説明

ハンドルで指定した3次元図形の中で最上位の図形のハンドルを返します。

Parameters:

objectHd Handle to object. 3次元図形のハンドル



  FInFolder Document List Handling 
MiniCAD

VectorScript Declaration:

FUNCTION   FInFolder
( sfHd:HANDLE ) :HANDLE ;

Python:

def  vs.FInFolder(sfHd):
   return HANDLE

Description:

Function FInFolder returns a handle to the first object in the referenced symbol folder. The object can be either a symbol definition or a nested symbol folder.
If the folder is empty, the function returns NIL.

説明

ハンドルで指定したフォルダの中で最上位のシンボルのハンドルを返します。図形が存在しない場合はNILを返します。

Parameters:

sfHd Handle to symbol definition or symbol folder. フォルダのハンドル



  FInGroup Document List Handling 
MiniCAD

VectorScript Declaration:

FUNCTION   FInGroup
( ObjectHd:HANDLE ) :HANDLE ;

Python:

def  vs.FInGroup(ObjectHd):
   return HANDLE

Description:

Function FInGroup returns a handle to the first component object of the referenced group.

説明

ハンドルで指定したグループの中で最上位の図形のハンドルを返します。

Parameters:

ObjectHd Handle to group object. グループのハンドル

Example:

PROCEDURE Example;
VAR
	h :HANDLE;
BEGIN
	h := FInGroup(FSActLayer);
	WHILE h <> NIL DO BEGIN
		SetClass(h, 'None');
		h := NextObj(h);
	END;
END;
RUN(Example);



  FInLayer Document List Handling 
MiniCAD

VectorScript Declaration:

FUNCTION   FInLayer
( h:HANDLE ) :HANDLE ;

Python:

def  vs.FInLayer(h):
   return HANDLE

Description:

Function FInLayer returns a handle to the first object within the referenced layer. If the layer is empty, the function returns NIL.

説明

ハンドルで指定したレイヤ上にある最上位の図形のハンドルを返します。図形が存在しない場合はNILを返します。

Parameters:

h Handle to layer. レイヤのハンドル



  FInSymDef Document List Handling 
MiniCAD

VectorScript Declaration:

FUNCTION   FInSymDef
( sdHd:HANDLE ) :HANDLE ;

Python:

def  vs.FInSymDef(sdHd):
   return HANDLE

Description:

Function FInSymDef returns a handle to the first component object within the referenced symbol definition.

説明

ハンドルで指定した登録シンボルの中で最上位の図形のハンドルを返します。

Parameters:

sdHd Handle to symbol definition. 登録シンボルのハンドル



  FObject Document List Handling 
MiniCAD

VectorScript Declaration:

FUNCTION   FObject
:HANDLE ;

Python:

def  vs.FObject():
   return HANDLE

Description:

Function FObject returns a handle to the first object in the active document. If the document is empty, the function returns NIL.

説明

ドキュメント内にある最上位の図形のハンドルを返します。図形が存在しない場合はNILを返します。



  ForEachMaterial Document List Handling 
Vectorworks 2021

VectorScript Declaration:

PROCEDURE   ForEachMaterial
(   onlyUsed :BOOLEAN;
    callback :PROCEDURE
) ;

Python:

def  vs.ForEachMaterial(onlyUsed, callback):
   return None

Description:

Enumerate the materials in the current file.

説明

現在のファイルにあるマテリアルを取得します。

Parameters:

onlyUsed List only materials that are used in the current file. ファイル内で使用されているマテリアルに限定するかどうか指定します。
callback Callback to be executed for each material in the file, or for each material that is used, depending on the 'used' parameter. 「onlyUsed」パラメータの設定によって、ファイル内にある各マテリアル、または使用されている各マテリアルをコールバックします。



  FSActLayer Document List Handling 
MiniCAD

VectorScript Declaration:

FUNCTION   FSActLayer
:HANDLE ;

Python:

def  vs.FSActLayer():
   return HANDLE

Description:

Function FSActLayer returns a handle to the first selected object on the active layer. If no objects are selected, the function returns NIL.

説明

アクティブなレイヤ上で選択されている最上位の図形のハンドルを返します。図形が存在しない場合はNILを返します。



  FSObject Document List Handling 
MiniCAD

VectorScript Declaration:

FUNCTION   FSObject
( h:HANDLE ) :HANDLE ;

Python:

def  vs.FSObject(h):
   return HANDLE

Description:

Function FSObject returns the handle to the first selected object in the referenced layer. If no objects are selected, the function returns NIL.

説明

ハンドルで指定したレイヤ上で選択されている最上位の図形のハンドルを返します。図形が存在しない場合はNILを返します。

Parameters:

h Handle to layer. レイヤのハンドル



  FSymDef Document List Handling 
MiniCAD

VectorScript Declaration:

FUNCTION   FSymDef
:HANDLE ;

Python:

def  vs.FSymDef():
   return HANDLE

Description:

Function FSymDef returns a handle to the first symbol definition in the current document's symbol library. If the symbol library is empty, the function returns NIL.

説明

シンボルライブラリに登録されている最上位のシンボルのハンドルを返します。図形が存在しない場合はNILを返します。



  GetActualNameFromResourceList Document List Handling 
VectorWorks12.0

VectorScript Declaration:

FUNCTION   GetActualNameFromResourceList
(   listID :LONGINT;
    index :LONGINT
) :DYNARRAY[] of CHAR ;

Python:

def  vs.GetActualNameFromResourceList(listID, index):
   return DYNARRAY of CHAR

Description:

Returns the actual name of the indicated item in the specified resource list. This call will delete the filename that is appended for resources with same name from different files.

説明

指定したリソースリストにあるリソースの名前を返します。
指定したリソースリストに異なるファイルからの同じ名前のリソースがある場合、名前はファイル名を括弧で閉じたものになりますが、括弧で閉じられていない実際の名前を返します。

Parameters:

listID an ID for a resouce list created by the BuildResourceList function. BuildResourceListコマンドで作成されたリソースリストの番号
index an index into the list. リソースリスト内の番号

Example:

displayName := GetActualNameFromResourceList(listID, index);

See Also:

GetNameFromResourceList  



  GetNameFromResourceList Document List Handling 
VectorWorks12.0

VectorScript Declaration:

FUNCTION   GetNameFromResourceList
(   listID :LONGINT;
    index :LONGINT
) :DYNARRAY[] of CHAR ;

Python:

def  vs.GetNameFromResourceList(listID, index):
   return DYNARRAY of CHAR

Description:

Returns the name to display of the indicated item in the specified resource list. If the list has items with the same name from different files, the display name will have the filename added to it in parentheses.

説明

指定したリソースリストにあるリソースの名前を返します。
指定したリソースリストに異なるファイルからの同じ名前のリソースがある場合、名前はファイル名を括弧で閉じたものになります。

Parameters:

listID an ID for a resouce list created by the BuildResourceList function. BuildResourceListコマンドで作成されたリソースリストの番号
index an index into the list. リソースリスト内の番号

Example:

hatchName := GetNameFromResourceList(listID, index);
if (pos('P', hatchName) = 1) then
	DeleteResourceFromList(listID, index)

See Also:

GetActualNameFromResourceList  



  GetResourceFromList Document List Handling 
VectorWorks12.0

VectorScript Declaration:

FUNCTION   GetResourceFromList
(   listID :LONGINT;
    index :LONGINT
) :HANDLE ;

Python:

def  vs.GetResourceFromList(listID, index):
   return HANDLE

Description:

Returns the indicated resource from the indicated resource list, if the resource is in the current document. Otherwise it returns nil.

説明

アクティブなドキュメントにリソースがある場合はリソースのハンドルを返します。ない場合は0を返します。

Parameters:

listID an ID for a resource list created by the BuildResourceList command. BuildResourceListで作成されたリソースリストの番号
index an index into the list. リソースリスト内の番号

Example:

hatch := GetResourceFromList(listID, index);
if (hatch = NIL) then
	hatch := ImportResourceToCurrentFile(listID, index);



  ImportResourceToCurrentFile Document List Handling 
VectorWorks12.0

VectorScript Declaration:

FUNCTION   ImportResourceToCurrentFile
(   listID :LONGINT;
    index :LONGINT
) :HANDLE ;

Python:

def  vs.ImportResourceToCurrentFile(listID, index):
   return HANDLE

Description:

Imports the indicated resource from the specified list to the current file, if it is not already in the current file, and returns the handle to the resource.

説明

指定したリソースリストにあるリソースをアクティブなファイルに取り込みます。リソースがアクティブなファイルになかった場合、リソースのハンドルを返します。

Parameters:

listID an ID for a resource list created by the BuildResourceList command. BuildResourceListで作成されたリソースリストの番号
index an index into the list. リソースリスト内の番号

Example:

hatch := GetResourceFromList(listID, index);
if (hatch = NIL) then
	hatch := ImportResourceToCurrentFile(listID, index);



  ImportResToCurFileN Document List Handling 
Vectorworks 2014

VectorScript Declaration:

FUNCTION   ImportResToCurFileN
(   listID :LONGINT;
    index :LONGINT;
    callback :PROCEDURE
) :HANDLE ;

Python:

def  vs.ImportResToCurFileN(listID, index, callback):
   return HANDLE

Description:

Imports the indicated resource from the specified list to the current file, if it is not already in the current file, and returns the handle to the resource. It will use a callback function to determine how to handle duplicate resouce.

説明

まだ存在ないものであれば、指定したリスト中の指定したリソースを現在の書類に取り込み、リソースへのハンドルを返します。重複したリソースを処理するためのコールバック関数を使います。



  LActLayer Document List Handling 
MiniCAD

VectorScript Declaration:

FUNCTION   LActLayer
:HANDLE ;

Python:

def  vs.LActLayer():
   return HANDLE

Description:

Function LActLayer returns a handle to the last object in the active layer.

説明

アクティブなレイヤ上の最下位の図形のハンドルを返します。

返り値

図形のハンドル



  LNewObj Document List Handling 
MiniCAD

VectorScript Declaration:

FUNCTION   LNewObj
:HANDLE ;

Python:

def  vs.LNewObj():
   return HANDLE

Description:

Returns a handle to the last object created by a VectorScript function call during the current script execution.


説明

直前に作成された図形のハンドルを返します。

Result:

Returns a HANDLE to the most recently created object, otherwise returns NIL.

返り値

図形のハンドルを返します。その他の場合はNILを返します。



  LObject Document List Handling 
MiniCAD

VectorScript Declaration:

FUNCTION   LObject
:HANDLE ;

Python:

def  vs.LObject():
   return HANDLE

Description:

Function LObject returns a handle to the last object in the active document.

説明

ドキュメント内にある最下位の図形のハンドルを返します。

返り値

図形のハンドル



  LSActLayer Document List Handling 
MiniCAD

VectorScript Declaration:

FUNCTION   LSActLayer
:HANDLE ;

Python:

def  vs.LSActLayer():
   return HANDLE

Description:

Function LSActLayer returns a handle to the last selected object on the active layer. If no objects are selected, the function returns NIL.

説明

アクティブなレイヤ上で選択されている最下位の図形のハンドルを返します。図形が存在しない場合はNILを返します。

返り値

図形のハンドル



  NextDObj Document List Handling 
MiniCAD

VectorScript Declaration:

FUNCTION   NextDObj
( h:HANDLE ) :HANDLE ;

Python:

def  vs.NextDObj(h):
   return HANDLE

Description:

Function NextDObj returns the next deselected object after the referenced object in a list. If the end of the list is reached, the function returns NIL.

説明

ハンドルで指定した図形の次にある図形のうち、選択されていないもののハンドルを返します。図形が存在しない場合はNILを返します。

Parameters:

h Handle to object. 図形のハンドル

返り値

図形のハンドル

Example:

handleToObject:=FObject;
WHILE handleToObject <> NIL DO BEGIN
  SetSelect(handleToObject);
  handleToObject:=NextDObj(handleToObject);
END;
{ selects all deselected objects }



  NextLayer Document List Handling 
MiniCAD

VectorScript Declaration:

FUNCTION   NextLayer
( h:HANDLE ) :HANDLE ;

Python:

def  vs.NextLayer(h):
   return HANDLE

Description:

Function NextLayer returns a handle to the next layer in the document after the referenced. If the end of the list has been reached, the function returns NIL.

説明

ハンドルで指定したレイヤの次にあるレイヤのハンドルを返します。図形が存在しない場合はNILを返します。

Parameters:

h Handle to layer. レイヤのハンドル

返り値

レイヤのハンドル

Example:

handleToLayer:=FLayer;
WHILE handleToLayer <> NIL DO BEGIN
  SysBeep;
  handleToLayer:=NextLayer(handleToLayer);
END; 
{ will process through all the layers in the list }



  NextObj Document List Handling 
MiniCAD

VectorScript Declaration:

FUNCTION   NextObj
( h:HANDLE ) :HANDLE ;

Python:

def  vs.NextObj(h):
   return HANDLE

Description:

Function NextObj returns the next object in any list . If the end of the list is reached, the function returns NIL. This procedure can be used with other handle routines such as FirstIn3D,FInGroup, FirstInSymDef, or FLayer.

説明

ハンドルで指定した図形の次にある図形のハンドルを返します。図形が存在しない場合はNILを返します。

Parameters:

h Handle to object, group, or symbol definition. 図形のハンドル

返り値

図形のハンドル

Example:

handleToObject:=FObject;
WHILE handleToObject <> NIL DO BEGIN
  i:=i+1;
  handleToObject:=NextObj(handleToObject);
END;



  NextSObj Document List Handling 
MiniCAD

VectorScript Declaration:

FUNCTION   NextSObj
( h:HANDLE ) :HANDLE ;

Python:

def  vs.NextSObj(h):
   return HANDLE

Description:

Function NextSObj returns the next selected object in a list. If the end of the list is reached, the function returns NIL.

説明

ハンドルで指定した図形の次にある図形のうち、選択されている図形のハンドルを返します。図形が存在しない場合はNILを返します。

Parameters:

h Handle to object. 図形のハンドル

返り値

図形のハンドル



  NextSymDef Document List Handling 
MiniCAD

VectorScript Declaration:

FUNCTION   NextSymDef
( symHd:HANDLE ) :HANDLE ;

Python:

def  vs.NextSymDef(symHd):
   return HANDLE

Description:

Function NextSymDef returns a handle to the next definition in the symbol library after the referenced symbol. If the end of the list has been reached, the function returns NIL.

説明

ハンドルで指定した登録シンボルの次にある登録シンボルのハンドルを返します。図形が存在しない場合はNILを返します。

Parameters:

symHd Handle to symbol definition in library. 登録シンボルのハンドル

返り値

登録シンボルのハンドル



  PrevDObj Document List Handling 
MiniCAD

VectorScript Declaration:

FUNCTION   PrevDObj
( h:HANDLE ) :HANDLE ;

Python:

def  vs.PrevDObj(h):
   return HANDLE

Description:

Function PrevDObj returns the previous deselected object in a list of objects . If the end of the object list is reached, the function returns NIL.

説明

ハンドルで指定した図形の前にある図形のうち、選択されていない図形のハンドルを返します。図形が存在しない場合はNILを返します。

Parameters:

h Handle to object. 図形のハンドル

返り値

図形のハンドル



  PrevLayer Document List Handling 
MiniCAD

VectorScript Declaration:

FUNCTION   PrevLayer
( h:HANDLE ) :HANDLE ;

Python:

def  vs.PrevLayer(h):
   return HANDLE

Description:

Function PrevLayer returns a handle to the layer in the document preceding the referenced layer.

説明

ハンドルで指定したレイヤの前にあるレイヤのハンドルを返します。

Parameters:

h Handle to layer. レイヤのハンドル

返り値

レイヤのハンドル



  PrevObj Document List Handling 
MiniCAD

VectorScript Declaration:

FUNCTION   PrevObj
( h:HANDLE ) :HANDLE ;

Python:

def  vs.PrevObj(h):
   return HANDLE

Description:

Function PrevObj returns the object in any list which precedes the specified object. If the end of the list is reached, the function returns NIL.

説明

ハンドルで指定した図形の前にある図形のハンドルを返します。図形が存在しない場合はNILを返します。

Parameters:

h Handle to object, group, or symbol definition. 図形のハンドル

返り値

図形のハンドル



  PrevSObj Document List Handling 
MiniCAD

VectorScript Declaration:

FUNCTION   PrevSObj
( h:HANDLE ) :HANDLE ;

Python:

def  vs.PrevSObj(h):
   return HANDLE

Description:

Function PrevSObj returns the previous selected object in the list preceding the referenced object.

説明

ハンドルで指定した図形の前にある図形のうち、選択されている図形のハンドルを返します。

Parameters:

h Handle to object. 図形のハンドル

返り値

図形のハンドル



  PrevSymDef Document List Handling 
MiniCAD

VectorScript Declaration:

FUNCTION   PrevSymDef
( symHd:HANDLE ) :HANDLE ;

Python:

def  vs.PrevSymDef(symHd):
   return HANDLE

Description:

Function PrevSymDef returns a handle to the symbol definition in the symbol library preceding the referenced definition.

説明

ハンドルで指定した登録シンボルの前にある登録シンボルのハンドルを返します。

Parameters:

symHd Handle to symbol definition. 登録シンボルのハンドル

返り値

登録シンボルのハンドル



  ResList_ActFolder Document List Handling 
Vectorworks 2019.3

VectorScript Declaration:

PROCEDURE   ResList_ActFolder
(   uniqueID :STRING;
    folder :STRING
) ;

Python:

def  vs.ResList_ActFolder(uniqueID, folder):
   return None

Description:

Set a filter to show only symbols form a particular symbol folder in the active file. The 'uniqueID' is a string identifier uniquely identifying this control.

説明

アクティブファイルの指定したシンボルフォルダの中にあるシンボルだけを表示するフィルタを設定します。「uniqueID」はこのコントロールを識別する固有のストリング識別子です。



  ResList_AddCont Document List Handling 
Vectorworks 2017

VectorScript Declaration:

PROCEDURE   ResList_AddCont
(   uniqueID :STRING;
    folderSpec :INTEGER
) ;

Python:

def  vs.ResList_AddCont(uniqueID, folderSpec):
   return None

Description:

Adds a content location. The 'uniqueID' is a string identifier uniquely identifying this control.

説明

コンテンツの場所を追加します。 uniqueIDはこのコントロールを識別する固有の文字列です。



  ResList_AddCont1 Document List Handling 
Vectorworks 2017

VectorScript Declaration:

PROCEDURE   ResList_AddCont1
(   uniqueID :STRING;
    baseFolderSpec :INTEGER;
    folderName :DYNARRAY[] of CHAR
) ;

Python:

def  vs.ResList_AddCont1(uniqueID, baseFolderSpec, folderName):
   return None

Description:

Adds a content lcoation. The 'uniqueID' is a string identifier uniquely identifying this control.

説明

コンテンツの場所を追加します。 uniqueIDはこのコントロールを識別する固有の文字列です。



  ResList_Filter Document List Handling 
Vectorworks 2020

VectorScript Declaration:

PROCEDURE   ResList_Filter
(   uniqueID :STRING;
    callback :PROCEDURE
) ;

Python:

def  vs.ResList_Filter(uniqueID, callback):
   return None

Description:

Set a filter for resource in active document. The 'uniqueID' is a string identifier uniquely identifying this control.

説明

アクティブファイル内のリソースのフィルタを設定します。「uniqueID」はこのコントロールを識別する固有のストリング識別子です。



  ResList_FilterNonAct Document List Handling 
Vectorworks 2020

VectorScript Declaration:

PROCEDURE   ResList_FilterNonAct
(   uniqueID :STRING;
    callback :PROCEDURE
) ;

Python:

def  vs.ResList_FilterNonAct(uniqueID, callback):
   return None

Description:

sets the filter for resource in the non-active open documents. The 'uniqueID' is a string identifier uniquely identifying this control.

説明

開いている非アクティブファイル内のリソースのフィルタを設定します。「uniqueID」はこのコントロールを識別する固有のストリング識別子です。



  ResList_GetSel Document List Handling 
Vectorworks 2017

VectorScript Declaration:

FUNCTION   ResList_GetSel
( uniqueID:STRING ) :STRING ;

Python:

def  vs.ResList_GetSel(uniqueID):
   return STRING

Description:

Return the selected item from the popup. The 'uniqueID' is a string identifier uniquely identifying this control.

説明

ポップアップからリソースを選択します。 uniqueIDはこのコントロールを識別する固有の文字列です。



  ResList_GetSelIsDoc Document List Handling 
Vectorworks 2017

VectorScript Declaration:

FUNCTION   ResList_GetSelIsDoc
( uniqueID:STRING ) :BOOLEAN ;

Python:

def  vs.ResList_GetSelIsDoc(uniqueID):
   return BOOLEAN

Description:

Return if the selected resource is in the current document. The 'uniqueID' is a string identifier uniquely identifying this control.

説明

選択されたリソースが現在の書類内にあるかどうかを返します。 uniqueIDはこのコントロールを識別する固有の文字列です。



  ResList_ImportItem Document List Handling 
Vectorworks 2017

VectorScript Declaration:

FUNCTION   ResList_ImportItem
( uniqueID:STRING ) :HANDLE ;

Python:

def  vs.ResList_ImportItem(uniqueID):
   return HANDLE

Description:

Import the currently selected item. This is the list that typically is created by call to BuildResourceList. The 'uniqueID' is a string identifier uniquely identifying this control.

説明

選択されているリソースをインポートします。 一般的にはBuildResourceList の呼びだしで作成されたリストです。 uniqueIDはこのコントロールを識別する固有の文字列です。



  ResList_ImportItemN Document List Handling 
Vectorworks 2017

VectorScript Declaration:

FUNCTION   ResList_ImportItemN
(   uniqueID :STRING;
    doConflict :LONGINT
) :HANDLE ;

Python:

def  vs.ResList_ImportItemN(uniqueID, doConflict):
   return HANDLE

Description:

Import the currently selected item. doConflict: 0 - dont import; 1 - replace; 2 - rename; 3 - ask with UI. The 'uniqueID' is a string identifier uniquely identifying this control.

説明

選択されているリソースをインポートします。 doConflict: 0 - インポートしない; 1 - 置き換える; 2 - リネームする; 3 - UIで指定する; uniqueIDはこのコントロールを識別する固有の文字列です。



  ResList_Init Document List Handling 
Vectorworks 2017

VectorScript Declaration:

PROCEDURE   ResList_Init
(   uniqueID :STRING;
    objectType :INTEGER
) ;

Python:

def  vs.ResList_Init(uniqueID, objectType):
   return None

Description:

Initialize a categories resource with resources of the specified type. The 'uniqueID' is a string identifier uniquely identifying this control.

説明

カテゴリリソースを指定したタイプのリソースで初期化します。 uniqueIDはこのコントロールを識別する固有の文字列です。



  ResList_InitDef Document List Handling 
Vectorworks 2017

VectorScript Declaration:

PROCEDURE   ResList_InitDef
(   uniqueID :STRING;
    univName :STRING
) ;

Python:

def  vs.ResList_InitDef(uniqueID, univName):
   return None

Description:

Initialize a categories resource with red symbol resources of the specified universal name. The 'uniqueID' is a string identifier uniquely identifying this control.

説明

カテゴリリソースを指定した赤のシンボルリソースで初期化します。 uniqueIDはこのコントロールを識別する固有の文字列です。



  ResList_IsSelValid Document List Handling 
Vectorworks 2017

VectorScript Declaration:

FUNCTION   ResList_IsSelValid
( uniqueID:STRING ) :BOOLEAN ;

Python:

def  vs.ResList_IsSelValid(uniqueID):
   return BOOLEAN

Description:

Determine if the selection in the popup is valid. The 'uniqueID' is a string identifier uniquely identifying this control.

説明

リソースポップアップでの選択が有効かどうかを返します。 uniqueIDはこのコントロールを識別する固有の文字列です。



  ResList_PropFilter Document List Handling 
Vectorworks 2020

VectorScript Declaration:

PROCEDURE   ResList_PropFilter
(   uniqueID :STRING;
    callback :PROCEDURE
) ;

Python:

def  vs.ResList_PropFilter(uniqueID, callback):
   return None

Description:

sets the filter for the resource properties. The 'uniqueID' is a string identifier uniquely identifying this control.

説明

リソースプロパティのフィルタを設定します。「uniqueID」はこのコントロールを識別する固有のストリング識別子です。



  ResList_SelFAvail Document List Handling 
Vectorworks 2020

VectorScript Declaration:

PROCEDURE   ResList_SelFAvail
(   uniqueID :STRING;
  VAR  itemName :STRING;
    onlyCurrentDocument :BOOLEAN;
    searchOnline :BOOLEAN;
    skipCurrentDocument :BOOLEAN
) ;

Python:

def  vs.ResList_SelFAvail(uniqueID, onlyCurrentDocument, searchOnline, skipCurrentDocument):
   return itemName

Description:

Set the first available item in the resource popup. The 'uniqueID' is a string identifier uniquely identifying this control, item name is the item to search for, if not empty, rest is search properties

説明

リソース選択ポップアップで利用可能な先頭のアイテムを設定します。「uniqueID」はこのコントロールを識別する固有のストリング識別子です。「itemName」は検索対象のアイテム、残りは検索オプションのプロパティです。



  ResList_SetSel Document List Handling 
Vectorworks 2017

VectorScript Declaration:

PROCEDURE   ResList_SetSel
(   uniqueID :STRING;
    itemName :STRING
) ;

Python:

def  vs.ResList_SetSel(uniqueID, itemName):
   return None

Description:

Set the selected item in the resource popup. The 'uniqueID' is a string identifier uniquely identifying this control.

説明

リソースポップアップの選択されたリソースを設定します。 uniqueIDはこのコントロールを識別する固有の文字列です。



  ResourceListSize Document List Handling 
VectorWorks12.0

VectorScript Declaration:

FUNCTION   ResourceListSize
( listID:LONGINT ) :LONGINT ;

Python:

def  vs.ResourceListSize(listID):
   return LONGINT

Description:

Returns the number of items in the specified resource list.

説明

指定したリソースリストにあるリソースの数を返します。

Parameters:

listID an ID for a resouce list created by the BuildResourceList function. BuildResourceListで作成されたリソースリストの番号

Example:

{ Update numItems as the number of items in the resource list has }
{ changed. }
numItems := ResourceListSize(listID);



  SetParent Document List Handling 
VectorWorks10.0

VectorScript Declaration:

FUNCTION   SetParent
(   obj :HANDLE;
    container :HANDLE
) :BOOLEAN ;

Python:

def  vs.SetParent(obj, container):
   return BOOLEAN

Description:

Removes the object from its current container and places it within the given container. For example, SetParent can be used to put the referenced object into a group, or into a symbol definition, or to change the layer of the referenced object.

説明

現在のコンテナから図形を削除し、指定したコンテナへ置きます。
例えば、図形をグループやシンボル定義に入れたり、レイヤを変更することができます。

Parameters:

obj Handle to the object to move. 図形のハンドル
container Handle to the object that will become the parent of the obj variable. コンテナのハンドル

Example:

PROCEDURE SetParentExample;
VAR
	h1, h2 :HANDLE;
	boo :BOOLEAN;
BEGIN
	h1 := FSActLayer;
	h2 := NextObj(h1);
	boo := SetParent(h2, h1);
END;
RUN(SetParentExample);

See Also:

CreateDuplicateObject