MullinRJ Posted March 13, 2002 Share Posted March 13, 2002 The code got a little garbled. I think it should read like this: Procedure TurnOffClass;var xpoint, ypoint, dummynum : Real; thisobject, thissubobject : Handle; classname : String;BEGIN dummynum := 123; WHILE NOT GetPickObjectInfo(xpoint, ypoint, thisobject, thissubobject, dummynum) DO GetPt(xpoint,ypoint); IF (thissubobject = NIL) THEN BEGIN ClassName := GetClass(thisobject); HideClass(ClassName); END; IF (thissubobject <> NIL) THEN BEGIN ClassName := GetClass(thissubobject); HideClass(ClassName); END;END;Run(TurnOffClass); Procedure HideObject;VAR X, Y, dummynum : Real; thisobject, thissubobject : Handle; classname : String;BEGIN DSelectAll; dummynum := 123; WHILE NOT GetPickObjectInfo(xpoint, ypoint, thisobject, thissubobject, dummynum) DO GetPt(X, Y); IF (thissubobject = NIL) THEN SetSelect(thisobject); IF (thissubobject <> NIL) THEN SetSelect(thissubobject); Hide(SEL);END;Run(HideObject); R Mullin Quote Link to comment
AndyM Posted March 14, 2002 Author Share Posted March 14, 2002 I got this script from another post, but it doesn't work. Procedure TurnOffClass;var xpoint, ypoint, dummynum : real;thisobject, thissubobject : handle;classname : string;Procedure HideObject;var xpoint, ypoint, dummynum : real;thisobject, thissubobject : handle;classname : string; BEGINDSelectAll;dummynum := 123;WHILE NOT GetPickObjectInfo(xpoint,ypoint,thisobject,thissubobject,dummynum) DO BEGINGetPt(xpoint,ypoint);END; IF (thissubobject = NIL) THENBEGINSetSelect(thisobject);END;IF (thissubobject <> NIL) THENBEGINSetSelect(thissubobject); END;Hide(SEL); END; Run(HideObject);BEGINdummynum := 123;WHILE NOT GetPickObjectInfo(xpoint,ypoint,thisobject,thissubobject,dummynum) DO BEGINGetPt(xpoint,ypoint);END;IF (thissubobject = NIL) THENBEGINClassName := GetClass(thisobject); HideClass(ClassName);END;IF (thissubobject <> NIL) THENBEGINClassName := GetClass(thissubobject);HideClass(ClassName); END;END;Run(TurnOffClass); I also downloaded these PIOs but they don't seem to work either. http://www.lugaralgum.com/abav/vectorscript/ These are all supposed to turn off the class of the object you select. If anyone can figure out what is wrong I would be forever gratefull. VW9.5 Win XP PIII933 512MB [ 03-14-2002: Message edited by: AndyM7777 ] Quote Link to comment
AndyM Posted March 19, 2002 Author Share Posted March 19, 2002 Thanks for your help! It works now. Quote Link to comment
Alexandre Villares Posted April 4, 2002 Share Posted April 4, 2002 These scripts *do* work, but they do not update the classes pop-up menu. If you check the Classes... panel you'll see they actually did their job. But then again... you can add some code:VSave('%DummyRefreshMenuSheet%');VRestore(''%DummyRefreshMenuSheet%');VDelete(''%DummyRefreshMenuSheet%'); rgds,Alexandre 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.