Jump to content
Developer Wiki and Function Reference Links ×

Getting a Handle for the result of SymbolToGroup()


Sam Jones

Recommended Posts

I want to get a handle to the group created by the command SymbolToGroup().  LNewObj is not successful in delivering the result.

 

{==========================================================}

PROCEDURE Sym2GrpTest;
{$DEBUG}

CONST
    kSymName =    'Light Instr ETC Source 4 19deg 750W';
    
VAR
    TheSym        :HANDLE;
    TheGrp        :HANDLE;
    
BEGIN
    Symbol(kSymName, 12, 12, 0);
    TheSym := LNewObj;
    SymbolToGroup(TheSym, 1);    
    TheGrp := LNewObj;                          {TheGrp always receives the value of NIL}
    IF TheGrp <> NIL THEN
        BEGIN
            Scale(0.5, 0.5);
            SetName(TheGrp, 'The New Group');
        END
    ELSE
        AlrtDialog('The Grp is NIL');
END;
RUN(Sym2GrpTest);

{==========================================================}

 

Substituting "TheGrp := FSActLayer;" for "TheGrp := LNewObj;"  is successful, but only if only one object is selected.  When one tries to poll through an array of handles and placing them one at a time.  FSActLayer does not change value. 

So, does anyone know how to get a handle to the result of the "SymbolToGroup(TheSym, 1);" command?

 

Edited by Sam Jones
grammar
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...