ed Posted April 6, 2002 Share Posted April 6, 2002 Hello,have someone a scriptthat if you select a object than it's goesdirect to the right layer. thanks Ed Quote Link to comment
0 Hannes Posted April 6, 2002 Share Posted April 6, 2002 quote: Originally posted by ed: Hello,have someone a scriptthat if you select a object than it's goesdirect to the right layer.thanks Ed Hi Ed, try the one below. You can run it from a cript palette or put the code into a menu command or a Tool. HTH, Hannescopy all below the line:************************************************** Procedure setActiveLayer; {Hannes Lackner 2002, Hannes Lackner@aon.at, free for everyone. This script allows the user to pick a object, then the object's Layer willbe set to active layer} VARH:Handle;BoolMouse:Boolean;px,py:Real;LOptions:Integer;LName:String; Begin LOptions:=GetLayerOptions;SetLayerOptions(5);{<<<sets the Layer options temporarily to show/snap/modify other's, because the Object you want to select may be on a Layer which is current not editable} GetPt(pX, pY); h:=PickObject(pX, pY); IF h<> Nil Then Begin LName:=GetLName(GetLayer(h)); Layer(LName); AlrtDialog(Concat('Active Layer is: ',LName)); END Else Begin AlrtDialog('SET ACTIVE LAYER TOOL: no object was selected, please try again');END; SetLayerOptions(LOptions);{<<<reset the Layer Option} END; Run(setActiveLayer); Quote Link to comment
Question
ed
Hello,have someone a scriptthat if you select a object than it's goesdirect to the right layer.
thanks
Ed
Link to comment
1 answer to this question
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.