Jump to content
  • 0

Turn off classes


AndyM

Question

15 answers to this question

Recommended Posts

  • 0

Here is a script you can use that does the same thing as Fuge's, but will also work if you click on an object embedded in a wall, group or symbol.

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 BEGIN GetPt(xpoint,ypoint);END;

IF (thissubobject = NIL) THEN BEGIN SetSelect(thisobject); END;IF (thissubobject <> NIL) THEN BEGIN SetSelect(thissubobject); END;Hide(SEL);

END;

Run(HideObject);BEGINdummynum := 123;WHILE NOT GetPickObjectInfo(xpoint,ypoint,thisobject,thissubobject,dummynum) DO BEGIN GetPt(xpoint,ypoint);END;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);

Also, here is a script that will just hide the object you click. This is useful if you don't want to change the structure of your file, but just need to temporarily get to an object for some other reason. (Like snapping, or selecting something that is obscured) It will reappear next time the file is refreshed to the screen.

Procedure HideObject;var xpoint, ypoint, dummynum : real;thisobject, thissubobject : handle;classname : string;

BEGINDSelectAll;dummynum := 123;WHILE NOT GetPickObjectInfo(xpoint,ypoint,thisobject,thissubobject,dummynum) DO BEGIN GetPt(xpoint,ypoint);END;

IF (thissubobject = NIL) THEN BEGIN SetSelect(thisobject); END;IF (thissubobject <> NIL) THEN BEGIN SetSelect(thissubobject); END;Hide(SEL);

END;

Run(HideObject);

Hope that helps,Matthew Giampapa

Link to comment
  • 0

Yes tongue.gif" border="0 Dave---------------Procedure Showallclasses;VAR numberofclasses,ClassIndex:LONGINT;ClassVisibility:INTEGER;ClassName:STRING; BEGIN numberofclasses:=ClassNum; ClassIndex:=0;

FOR ClassIndex := 1 TO numberofclasses DO BEGIN ClassName:= ClassList( ClassIndex ); ClassVisibility:= GetCVis( ClassName );

IF ClassVisibility = -1 THEN BEGIN ShowClass( ClassName ); END; END; END;RUN ( Showallclasses );

Link to comment
  • 0

Lonnie,

Most likely when you did a copy and pasteto grab the script you may have either missedpart of the script or there may be a hiddencharacter that is causing the script not to run.One tiny thing being off will cause a problem.

That's my best guess.Dave

Link to comment
  • 0

Thanks for the scripts but when I use the Hide Class, I click the tool, the cursor changes to a small + and then I click on an object and the cursor turns into a hand momentarily but nothing happens

Also, how do you create custom Tool buttons with new pictures

Thanks

Link to comment
  • 0

quote:

Originally posted by CEA:
These are great! thank you all very much for making them available.

Could Nemetscek add an area to it's web site where other scripts could be posted?

There is also a section on the Tech Board called VectorScripts for this sort of discussion as well.

Link to comment

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.

Guest
Answer this question...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...