Sam Jones Posted February 22, 2023 Share Posted February 22, 2023 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. Quote Link to comment
Pat Stanford Posted February 22, 2023 Share Posted February 22, 2023 Variation of Waldo. Locus(0,0); HScale2D(PrevObj(LNewOb)j, X, Y, 0.2, 0.2, TRUE); I leave it to you to figure out how to delete the Locus. 1 Quote Link to comment
MullinRJ Posted February 23, 2023 Share Posted February 23, 2023 @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 1 Quote Link to comment
Recommended Posts
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.