Jump to content
Developer Wiki and Function Reference Links ×

Copying Symbol VW Libraries


Recommended Posts

I'm trying to copy a symbol from a file in one of the VW libraries, but failing miserably.  Code below.

 

 

PROCEDURE AttachAccessory;
{$DEBUG}

(*
'Light Acc Iris'
'Light Acc 6.25in Short Top Hat'
*)

CONST
    kcr = chr(13);
    
VAR
    TheLight        :HANDLE;
    TheAcc        :HANDLE;
    AccIndex        :LONGINT;
    PosX, PosY    :REAL;
    PosRot        :REAL;
    
    Rot3DX        :REAL;
    Rot3DY        :REAL;
    Rot3DZ        :REAL;

    Pos3DX        :REAL;
    Pos3DY        :REAL;
    Pos3DZ        :REAL;
    VWAccFile    :STRING;
    
    OK                :BOOLEAN;
    
BEGIN
    TheAcc := NIL;
    OK := TRUE;

 

{I HAVE TRIED EACH OF THE PATHWAYS BELOW.  I'm obviously missing something}


    (*VWAccFile := CONCAT('Macintosh HD', GetFolderPath(13),'Plug-ins/Objects - Ent Lighting Accessories/Accessories Generic.vwx');*)
    (*VWAccFile := CONCAT(GetFolderPath(13),'Plug-ins/Objects - Ent Lighting Accessories/Accessories Generic.vwx');*)


    VWAccFile := 'Plug-ins/Objects - Ent Lighting Accessories/Accessories Generic.vwx';
    
    (*VWAccFile := CONCAT('Macintosh HD', GetFolderPath(13),'Plug-ins\Objects - Ent Lighting Accessories\Accessories Generic.vwx');*)
    (*VWAccFile := CONCAT(GetFolderPath(13),'Plug-ins\Objects - Ent Lighting Accessories\Accessories Generic.vwx');*)
    (*VWAccFile := 'Plug-ins\Objects - Ent Lighting Accessories\Accessories Generic.vwx';*)


    AlrtDialog(concat('VWAccFile = ', VWAccFile));

    TheAcc := GetObject('Light Acc 6.25in Short Top Hat');
    
    IF TheAcc = NIL THEN
        BEGIN
            OK := CopySymbol(VWAccFile, 'Light Acc 6.25in Short Top Hat');
            IF OK THEN
                BEGIN
                    AlrtDialog('Copy MADE');
                    Symbol('Light Acc 6.25in Short Top Hat', 0, 0, 0);
                END
            ELSE
                AlrtDialog('Copy FAILED');
        END
    ELSE
        BEGIN
            AlrtDialog('Symbol in Document');
            Symbol('Light Acc 6.25in Short Top Hat', 0, 0, 0);
        END;
    
    REDRAWALL;

    
END;
RUN(AttachAccessory);
 

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...