Difference between revisions of "VS:BeginFolderN"

From Vectorworks Developer
Jump to: navigation, search
m (1 revision)
(fix example: syntax, use mentioned routine, not the old one)
Line 6: Line 6:
 
-----------------------------------------------------------------------------------------------------------
 
-----------------------------------------------------------------------------------------------------------
 
<desc>
 
<desc>
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.<BR>
+
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.
<BR>
+
 
 
To name the new folder, precede BeginFolderN with a call to NameObject.<BR>
 
To name the new folder, precede BeginFolderN with a call to NameObject.<BR>
 
</desc>
 
</desc>
Line 39: Line 39:
 
<sample>
 
<sample>
 
<code lang='vs'>
 
<code lang='vs'>
const
 
kSymbolDefinitions = 16;
 
 
NameObject('Object Symbols');
 
NameObject('Object Symbols');
BeginFolder(kSymbolDefinitions);
+
BeginFolderN(16); { 16 = symbol definitions }
 
   BeginSym('Oval Symbols');
 
   BeginSym('Oval Symbols');
 
     PenSize(14);
 
     PenSize(14);

Revision as of 11:03, 25 December 2017

.VectorScript|VectorScript ..VS:Function Reference|Function Reference ..VS:Function_Reference_Appendix|Appendix

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.

PROCEDURE BeginFolderN(
TYPE  :INTEGER);
def vs.BeginFolderN(type):
    return None

Parameters

type INTEGER the type of resource the folder will contain

Example

NameObject('Object Symbols');
BeginFolderN(16); { 16 = symbol definitions }
  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}

Version

Availability: from Vectorworks 2018
Personal tools
NamespacesFFFF

Variants
Actions
Advanced Search
See Also
Navigation
Toolbox