Mat Caird Posted June 27, 2002 Share Posted June 27, 2002 HI all - is there a way to quickly hide specifc classes. I'm getting a heck of a lot of classes, and going to the classes pull down, selecting classes, then scrolling through the open window to find the class I wish to hide is taking too long. Any ideas Thnks M Quote Link to comment
AndyM Posted June 28, 2002 Share Posted June 28, 2002 You can create a custom tool to do this and you can get the scripts here: http://www.nemetschek.net/cgi/ubb/ultimatebb.cgi?ubb=get_topic&f=21&t=000049 Hope that does the trick Quote Link to comment
Esther E. Posted June 28, 2002 Share Posted June 28, 2002 Hey Andy, very interesting. I would also love to have some tool like that, only: What do I do with that kind of a script? May seem a stupid question, but, you know, I'm just clicking on things. So I suppose I should give it some kind of a name an put it into the plug-ins folder, but what kind of a command will I have to access after that? (I hope for something like the AutoCAD command to switch of classes, you click on some object whose class you know, and the whole thing disappears from view) Quote Link to comment
ruud van de meent Posted June 28, 2002 Share Posted June 28, 2002 Hey Esther, First copy copy the script code(the tekst) to your clipboard. Then go to your resource pallet and, choose 'new script'.VW will ask you to give the script a name and a place to store the script. Paste te text into the script.Click OK. Go back to your resource pallet and locate the script. You will have to dubble click the script's name to activate it Quote Link to comment
MikeB Posted June 28, 2002 Share Posted June 28, 2002 Go Here http://www.terra.es/personal4/vectorbits There is a free tool that will do just what you want. Quote Link to comment
Mat Caird Posted June 28, 2002 Author Share Posted June 28, 2002 thx everyone:Mike B - they is Mac scripts unfortunaelty 4 me!Andy M - I can't get the thing to run...it falls over with the following error "Line #23: Procedure HideObject; | { Error: Did not expect this after end of statement - missing ;"Any ideas?THnkas Quote Link to comment
AndyM Posted June 29, 2002 Share Posted June 29, 2002 It is a bit goofy how you have to do this, so I will try and explain. I do not know if scripts are different for mac and PC, but I am on a PC Go to organize>create plug-inClick new...Select the "tool" radio button and click OKThis will add a tool called Untitled Plug-In to the list.Click re-name and name it.(turn off object class)Click the script button and paste this script into the box: Procedure TurnOffClass;var xpoint, ypoint, dummynum : Real;thisobject, thissubobject : Handle;classname : String;BEGINdummynum := 123;WHILE NOT GetPickObjectInfo(xpoint, ypoint, thisobject, thissubobject, dummynum) DO GetPt(xpoint,ypoint);IF (thissubobject = NIL) THENBEGINClassName := GetClass(thisobject); HideClass(ClassName);END;IF (thissubobject <> NIL) THENBEGINClassName := GetClass(thissubobject);HideClass(ClassName); END;END;Run(TurnOffClass); Click Done, then OK(If you want to get fancy you click on properties and replace the default icon with something else) Now click on File>Workspaces>Workspace Editor>Edit Current Workspace.Click the "Tools" tab then scroll down to where it says Miscellaneous - Your new tool should be there. Now all you need to do is select the pallet you want to place it in from the right side list and drag it over there. You can even add a shortcut key if you want. Click OK to exit the worspace editor. Now it's in your workspace and you just click on the tool and then the object whose class you want to turn off. It doesn't work on groups for some reason. Maybe someone else can fix the code so that it will. The method that Ruud suggested is simpler and will also work, but it will not stay with you when you start a new drawing. This way you will always have it. Hope that helps. [ 06-29-2002: Message edited by: AndyM7777 ] Quote Link to comment
Mat Caird Posted June 29, 2002 Author Share Posted June 29, 2002 awesome, it works - thanks! And btw, try adding a new menu item or VBA script in AutoCAD for a definition of goofy! 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.