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
0 Elite Exhibits Posted June 11, 2025 Share Posted June 11, 2025 On 4/6/2002 at 8:54 AM, Hannes said: This script allows the user to pick a object, then the object's Layer willbe set to active layer @Hannes Is there an updated version of this Script ? Please & Thank You Peter Quote Link to comment
0 Pat Stanford Posted June 13, 2025 Share Posted June 13, 2025 If you have your layer options set to anything other than Show/Snap/Modify Others, then you should be able to right click on an object and choose Force Select and it will change the active layer (and class, and other things) to allow the object to be selected. No script necessary. Won't work if you have Modify Others set as you will already (as long as the layer scale is the same) be able to select the object. 1 Quote Link to comment
0 Elite Exhibits Posted June 16, 2025 Share Posted June 16, 2025 On 6/13/2025 at 1:57 PM, Pat Stanford said: If you have your layer options set to anything other than Show/Snap/Modify Others @Pat Stanford So the brains says ... if there are multiple Design Layers visible, and one needs to Modify items on any of these Design Layers, set the Layer Options to Show/Snap/Modify Others ... and there in lies the rub ! So ... for others who may have assumed that Force Select just did not work as described - Please take note of Pats helpful advice. Thanks Peter Quote Link to comment
0 Pat Stanford Posted June 16, 2025 Share Posted June 16, 2025 I don't know the logic behind Force Select to know how it decides what parameters to change. I just know that it will adjust the visible and selectable layers and classes as necessary to make the Force Selected object selectable. Based on the help description above it sounds like like it will change the Layer Options (and probably the Class Options), but in a simple test that I just ran (two layers, one object on each layer, Show/Snap Others), the only thing that changed was the Active Layer to make for Force Selected object selected. 1 Quote Link to comment
0 Jesse Cogswell Posted June 16, 2025 Share Posted June 16, 2025 My reading of the help text says that Force Select will merely activate the needed Class / Layer of the selected item depending on the current Class / Layer option settings, it would not change the option settings. So if your Class Option is Show/Snap/Modify and your Layer Option is Show/Snap, Force Select will activate the selected object's Layer, but would not affect the active Class. If you had your Class Option to Show/Snap, it would activate the Class as well. Personally, I almost always have my Class Option set to Show/Snap/Modify (learned the hard way early on when using Symbols made up with different classes), and my Layer Option to either Show/Snap or Gray/Snap others. It's fairly rare that I need to select objects on more than one layer, and I love having the ability to Ctrl + A to grab everything on a layer without fearing that I'm also going to grab the floor or walls. It also helps avoiding moving the floor around when I'm trying to marquee select a bunch of objects. But I have worked with plenty of folks who believe that if they can see an object, it should mean that they can select the object and use Show/Snap/Modify as a result. But I'll give you two guesses as to which one is more likely to have objects on the wrong layer... 1 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
6 answers 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.