Jump to content

Hide Class Visibility by Clicking on Object


Recommended Posts

Hello,

Is there any way to hide the visibility of a class by clicking on the object of that class. For example, in AutoCAD, I had a script where I could click on a circle, type LF (Layer Freeze) and it would freeze that entire layer.

Any similar operation in VW?

Thanks!

WJustice

Link to comment

You can try this script:

 
PROCEDURE HideObjClass;
VAR
 pX,pY: REAL;
 objHdl: HANDLE;
 objClass: STRING;
BEGIN
GetPt(pX,pY);
objHdl:= PickObject(pX,pY);
IF objHdl <> NIL THEN
 BEGIN
 objClass:= GetClass(objHdl);
 HideClass(objClass);
 END;
END;
Run(HideObjClass);

The script can be added to a palette and activated by double clicking the script in the palette.

An alternate method is to create a tool script that you add to the workspace. And the code will be almost the same.

 
PROCEDURE HideObjClass;
VAR
 pX,pY: REAL;
 objHdl: HANDLE;
 objClass: STRING;
BEGIN
GetMouse(pX,pY);
objHdl:= PickObject(pX,pY);
IF objHdl <> NIL THEN
 BEGIN
 objClass:= GetClass(objHdl);
 HideClass(objClass);
 END;
END;
Run(HideObjClass);

Link to comment

The Visibility tool added in Vw 2009 allows you to do this and more:

- Classes mode: Clicking on an object allows you to set the visibility of that Class to visible, greyed or invisible.

- Layers mode: Clicking on the Layer allows you to set the visibility of that Layer to visible, greyed or invisible.

You can also determine what happens when you double click on the tool icon. The four options are:

- Make all Classes visible.

- Make only the Classes of the selected objects visible.

- Make all Layers visible.

- Make only the Layers of the selected objects visible.

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
Reply to this topic...

×   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...