bonus Posted October 1, 2008 Share Posted October 1, 2008 How do I get symbols to show by class (or by layer in ACAD) without editing the symbol itself? Do I have to convert them into groups, assign class and then create new symbols? or is there a smart way to do this? Quote Link to comment
Pat Stanford Posted October 1, 2008 Share Posted October 1, 2008 Symbols are a container object and can be assigned to a class. If the "container class" is invisible, all of the objects inside the container are hidden. Different instances of the symbol can be given different class. Set this through the OIP (or custom modification) just like any other object. Pat Quote Link to comment
bonus Posted October 2, 2008 Author Share Posted October 2, 2008 Hi Pat What I want is line colors and class assignements in the symbol to switch to the new class default color/assignment when I change class in the OIP. But I understand the symbols are locked and should be so to preserve their settings. What I'm about to do is to convert all my layers and classes in a document to fit to ACAD standards. They absolutely want colors to be by layer in all details of the symbols. I've done it as described above and that works fine. Quote Link to comment
Pat Stanford Posted October 2, 2008 Share Posted October 2, 2008 If these are really symbols (not Plug-ins or containers of Plug-Ins) this script should change the class of all the contained objects to match the class of the selected symbol. If you want to have the same symbol in different classes, you will need to make duplicates for each class required. Procedure SetSymbolContentsToClass; Var H1,H2:Handle; S1,S2,S3:String; N1:Integer; Function DoIt(H3:Handle) : boolean; Begin SetFillColorByClass(H3); SetFPatByClass(H3); SetLSByClass(H3); SetLWByClass(H3); SetMarkerByClass(H3); SetOpacityByClass(H3); SetPenColorByClass(H3); SetMarkerByClass(H3); SetClass(H3,S1); End; Begin N1:=0; H1:=FSActLayer; If GetType(H1)<>15 then AlrtDialog('Select a symbol instance and run the script again') else Begin S2:=GetSymName(ActSymDef); {Store active symbol def to reset later} SetActSymbol(GetSymName(H1)); H2:=ActSymDef; S1:=GetClass(H1); ForEachObjectInList(DoIt,0,2,FinSymDef(H2)); SetActSymbol(S2); RedrawAll; end; End; Run(SetSymbolContentsToClass); Quote Link to comment
bonus Posted October 2, 2008 Author Share Posted October 2, 2008 whoaw Pat!...I'm impressed but even more confused...this not my cup of tea. I'm still glad I know how to boot my computer. I would just mess everything up trying to insert new scripts as tempting as it might be. Thanks anyway! Quote Link to comment
Ray Libby Posted October 2, 2008 Share Posted October 2, 2008 Here is a tutorial. http://techboard.nemetschek.net/ubbthreads/ubbthreads.php?ubb=showflat&Number=93218#Post93218 Quote Link to comment
bonus Posted October 3, 2008 Author Share Posted October 3, 2008 Than you Ray I twice tried the first quick way to do it, but at the end VW did not recognize the .VS file as a script file. So there was no way to press OK. I also tried to name an empty file with.VS, but no.... I'll read through the other two methods later. 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.