DesignCAD 3D Max 2027 box
Now available

DesignCAD 2027

Hatches that follow their boundaries, an on-screen dial to turn your model, and a way to find any command by name, in a clean Windows 11 look.

Visibility of Blocks and Symbols

Started by ktk, March 09, 2007, 05:21:13 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

ktk

I am attempting to write a macro that will display assemblies made up of Blocks and/or symbols without just making all part (Blocks/Symbols) layers visible.  This is the outline and I would like your comments on it.  The main question is the text I find in Sys$(1) always the same for the origional Block and all inserted copies?

1. Use Drag Select to select the entities on the specified layer. Read and store the selection extents Sys(196) thru Sys(201).
2. Cycle thru the selected entities and for each type 26 read and store the string Sys$(1)
3. Cycle thru the Part layers and select the entity and compare the string Sys$(1) to the stored data.
4. When a match is found make that layer visible.

Note:  I am drawing Parts as Blocks with the origin set at X = -200 and assemblies are drawn with the origin reset to X = 0.  Then when all needed layers are visible the macro will Zoom to the assembly extents (found in step 1) and the origional Blocks will be hidden.

Keith

support

Keith,
You can not hide just one object on a layer you must make a whole layer visible or hidden.

ktk

#2
I am not trying to hide something that is on the same layer 

Note: The origional block is on say layer 11 the inserted block is on layer 10

Now why do I need layer 11 on and visible to see the copy on layer 10?  This makes this feature very hard to use in my application.

Is it not possible in the program to separate the block visibility flag (what ever that is) from the origional block and make it controlled by the layer visibility?  Possibly an option when the block is created.

Keith