Jump to content
Developer Wiki and Function Reference Links ×

Importing Vectorworks library line styles


Sam Jones

Recommended Posts

The same way as you get other resources with one of the BuildResourceList calls.

 

The Object Type for a Line Type  is 96.

 

The following folder indexes return one or more Line Types. 

 

2,  3,  7,  8,  15,  20,  23,  25,  26,  27,  29,  108,  110,  111,  115,  120,  125,  133,  142,  159,  161,  164,  167,  169,  174,  189,  190,  198,  202,  218,  219,  221,  223,  227,  228,  230,  242,  247,

 

I leave it to the reader to determine which folder index is best for your needs.  I have no idea WHAT folder the ones that are not in the list in the BuildResourceList documentation are.

 

Below is the script I used to generate the list of folders. I only put the CreateText in so I could copy the list to put in this post. If you run the script you will get an AlrtDialog that shows you the name of the first Line Type in the folder.

 

PROCEDURE Test; 
CONST
    ObjectType = 96; { LineTypes } 
    FolderIndex = 100; { BuildResourceList Def for Application Folder See Func. Ref } 
    SubFolderName = ''; { Nul subfolder get all folders and subfolders } 

VAR
    MyName : STRING; 
    MyList : LONGINT; 
    NumItems : LONGINT; 
	hatch : HANDLE;
	FIndex : Integer;
	S1		:String;

BEGIN
	S1:='';
	For FIndex := 1 to 255 DO
	Begin
    MyList := BuildResourceList(ObjectType, FIndex, '', NumItems); 
    MyName := GetNameFromResourceList(MyList, 1); { change this number to get the names of other textures } 
	If NumItems>0 then 
	BEGIN
    AlrtDialog(Concat( Date(2, 2), '  ',FIndex,'  : The Name is ', MyName, ' *** Total items in list: ', NumItems)); 
	S1:=Concat(S1,FIndex,',  ');
	End;
	End;
	Message(S1);
	hatch := GetResourceFromList(MyList, 1);
	IF (hatch = NIL) THEN
	hatch := ImportResourceToCurrentFile(MyList, 1);
	
	DeleteResourceFromList(MyList, 1);
	
	CreateText(S1);
	
END; 
RUN(Test);

 

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...