CARMELHILL Posted May 24, 2004 Share Posted May 24, 2004 Someone made up a script for me a while back that worked in versions 9 and 10, but now in 11 they don't work correctly. Can someone familayr with scripts review them? Petri gave me a new script to shut off a selected class, however you have to select the objects first, then hit the tool. His script was HIDECLASS(GETCLASS(FSACTLAYER)); A simple one liner. I'd rather click the tool and then select all the classes or layers I want ot shut off. The original script follows: This is the hide class script following... Procedure show_hideClass; VAR pX, pY:REAL; Objekth: HANDLE; CurrentClassStr,ClassToHideStr:String; Begin GetPt(pX, pY); Objekth:=PickObject(pX, pY); IF Objekth<>NIL Then Begin CurrentClassStr:=ActiveClass; ClassToHideStr:=GetClass(Objekth); IF ((GetCVis(ClassToHideStr))=-1) THEN Begin ShowClass(ClassToHideStr); AlrtDialog(Concat('The Class *',ClassToHideStr,'* is set to visible')); END ELSE Begin HideClass(ClassToHideStr); AlrtDialog(Concat('The Class *',ClassToHideStr,'* is set to invisible')); END; NameClass(CurrentClassStr); IF (CurrentClassStr=ClassToHideStr) & ((GetCVis(ClassToHideStr))=-1) THEN AlrtDialog('you have set the active Class to Invisible. Select a different Class in the menu bar to take effect of this action'); END ELSE AlrtDialog('No Object selected'); Redrawall; END; This is the hide layer script following.... Procedure show_hideLayer; VAR pX, pY:REAL; Objekth: HANDLE; CurrentLayerStr,LayerToHideStr:String; Begin GetPt(pX, pY); Objekth:=PickObject(pX, pY); IF Objekth<>NIL Then Begin CurrentLayerStr:=GetLName(ActLayer); LayerToHideStr:=GetLName(GetLayer(Objekth)); Layer(LayerToHideStr); IF ((GetLVis(GetLayer(Objekth)))=-1) THEN Begin ShowLayer; AlrtDialog(Concat('The Layer *',LayerToHideStr,'* is set to visible')); END ELSE Begin HideLayer; AlrtDialog(Concat('The Layer *',LayerToHideStr,'* is set to invisible')); END; Layer(CurrentLayerStr); IF (CurrentLayerStr=LayerToHideStr) & ((GetLVis(GetLayer(Objekth)))=-1) THEN AlrtDialog('you have set the active Layer to Invisible. Select a different Layer in the menu bar to take effect of this action'); END ELSE AlrtDialog('No Object selected'); RedrawAll; END; Thank you to anyone that can lend a helping hand. Edward Koenig Carmelhill Architects Quote Link to comment
patman Posted August 31, 2004 Share Posted August 31, 2004 These scripts seam to work fine. What is the problem? Patrick 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.