Jump to content
Developer Wiki and Function Reference Links ×

Handle to a Group


Sam Jones

Recommended Posts

I would like to convert a symbol to a group and then scale the group.  Converting the symbol is easy with , but getting a handle to pass the HScale2D routine seems to fail.  The code below fails, and yes the FSActLayer is a symbol.

 

PROCEDURE UnGroupAndScale;

VAR
    Obj        :HANDLE;
    Grp        :HANDLE;
    X, Y    :REAL;

BEGIN
    Obj := FSActlayer;

    GetSymLoc(Obj, X, Y);
    SymbolToGroup(Obj, 2);

    HScale2D(LNewObj, X, Y, 0.2, 0.2, TRUE);
    ReDrawAll
END;
RUN(UnGroupAndScale);

 

So how should I do this?

 

TIA yet again.

Link to comment

@Sam Jones,

   Do you need to ungroup it? You can scale symbols now, too.

 

SetObjectVariableInt(Obj, 101, 2);	{ ScaleMode: 1=None, 2=Symmetric, 3=Asymmetric }
SetObjectVariableReal(Obj, 102, 0.2);	{ X scale factor }
SetObjectVariableReal(Obj, 103, 0.2);	{ Y scale factor }
SetObjectVariableReal(Obj, 104, 0.2);	{ Z scale factor }

 

Symbols will scale around the Insertion Point. If you are only scaling symmetrically (ObjVar_101 = 2), you only need to set ObjVar_102 (X Scale Factor), as all symbol axes will use that value.

 

If you do need to ungroup it —> What@Pat Stanford said.

 

Raymond

  • Like 1
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...