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.

Why can't interior objects be "cloaked" by their group?

Started by MarkX, May 01, 2012, 10:26:44 AM

Previous topic - Next topic

0 Members and 0 Guests are viewing this topic.

prl

Quote from: MarkX on May 04, 2012, 06:24:52 AM
It would take me a long time to re-snap 20 some parts, especially if I can't see a bunch stuff between me and the snap points invisible.

Have you considered eliminating the spaghetti views by using layer state routines to save relevant views?  No reason to work on the 1st floor framing plan (for example), looking through roof framing and the upper floor, etc.  BobP has written and posted many layer state saving routines. I'm assuming they are still around. They are a great starting point. Keep in mind I don't know your background; if you are a power user, programming fan, are already using these, wrote your own, etc.


Lar, thanks for the update on blocks.  Your summaries are worth gold to me.


Bob P

My layer utilities:
http://www.wwslalom.net/dc/layers.zip

Look in the included layerhelp.txt file for a description of the macros.  I don't think that the colors.txt file will work with versions after 16, but everything else will work.


DrollTroll

QuoteThanks in advance, DT, if "visibility by host layer" for groups is restored in V22.

Sorry, won't be in 22.0. We're in feature freeze right now. Maybe 22.1 though.
25 years with DesignCAD

Dr PR

DT,

I'll second the motion to restore "by-layer" visibility so long as it can be disabled, and it probably shouldn't be the default.

I also like the block editing capability. Of course it isn't very hard to do this now, but simplifying the process won't hurt.

Making block rotation and mirror work the same as any other object would be a good thing (you may already have fixed that).

With these features blocks might become useful substitutes for groups and solids.

It would be good to have a pop-up warning if we try to edit a block like an ordinary object (slice, solid Booleans, etc.). An option to explode the block and replace it with the real objects before continuing would be nice. This way it would be possible to define standard building material blocks, like 2x4s of predefined length or sheets of plywood (like would come off the truck) and then select one of these "virtual" objects (blocks) and modify it just like a carpenter would do and have the resulting object become a part of the drawing (not a block unless the user decided to define it to be a block).

Some things to think about for future versions.

Phil
DesignCAD user since 1987

DrollTroll

QuoteMaking block rotation and mirror work the same as any other object would be a good thing (you may already have fixed that).

Rotation works pretty much as expected already, I think. Mirroring should be fixed in 22.0 when it releases.
25 years with DesignCAD

paulerens

#50
QuoteI want to make a group invisible and have EVERYTHING invisible.
Mark,
Or, I do not understand, or the group does have this capability.
Here is a macro which make your entire group invisible, and the same macro makes them visible again.
Assuming layer (0) is empty
z = layer(0)
If ODD(z)=1 Then
>SelectLayer
{
<Layer 0
}
C=Sys(80)
Dim ent(C)
Sys(36)=2
For j = 1 To C  
GetSelect j,i
Entity i  
Getattr i, type, select, laynum, group
nam$ =Sys$(300)
laynum = Val(nam$)
 Sys$(300)=""
  Putattr i, type, select, laynum, group
Next j
Layer(2000)=14
Layer(0)=0
Layer(Sys(3))=14
Sys(80)=0
Sys(36)=0
Regen
End
End If
>PointSelect
{
<CmdPrompt "Select a group!."
}
C=Sys(80)
Dim ent(C)
Sys(36)=2
For j = 1 To C  
GetSelect j,i
Entity i  
Getattr i, type, select, laynum, group
Sys$(300)= laynum
 laynum = 0
  Putattr i, type, select, laynum, group
Next j
Layer(2000)=14
Layer(0)=0
Layer(Sys(3))=14
Sys(80)=0
Sys(36)=0
Regen
End

MarkX

Quote from: paulerens on May 04, 2012, 04:47:31 PM
QuoteI want to make a group invisible and have EVERYTHING invisible.
Mark,
Or, I do not understand, or the group does have this capability.
Hi Paul,

Your macro makes the group invisible by moving the contents to a layer that is invisible (layer zero). I don't want to move the contents to a different layer. Its very likely that I worked hard to put those elements on their particular layer.   I want to make the group container itself hidden (by making its layer hidden) and automatically have it hide the contents of the group.

This is how it already works with blocks. But blocks are more heavy duty than is necessary for this kind of task. It is also how it apparently works in the French version of DC. Very likely the code is actually in the English version, but not activated.

Being able to quickly hide stuff away so that you can work unencumbered is a powerful and obvious feature.

Thanks,
Mark

paulerens

Mark,
If the macro runs the second time, the group is visible again and the entities are returned in their original layers.
Not tried, I think. ;D
Paul.

prl

paulerens, great idea!  I had forgotten about using Sys$(300) as a database field.  Ran your code, needed to fix one typo.

For j = 1 To C  
GetSelect j,i
Entity i  
Getattr i, type, select, laynum, group
nam$ =Sys$(300)
laynum = Val(nam$)
 Sys$(300)=""
  Putattr i, type, select, laynum, group
Next j

I'm going to file this away for further study.  I know the getselect and such doesn't properly "get" solids, so may have to add some code.  I remember Dempsey ran into this with his push-apart /exploded parts routines.  I think we solved it. Also people who are using the sys$(300) string for database storage or material takeoff part lists will need to have this approach append and remove the layer number tag field.



Mark, paulerens approach is to store and restore the layer numbers for the selected or group entities.  It should put them back to the original locations, with the exception of solids with grids.  



Once again, thanks paulerens for the idea!!!!  You made my time back visiting worth it!


edit:  OK, poking around the search feature on this forum trying to fix the getselect deficiency.  Here is a link to the subroutine that can be added to the code concept to make it work for solids also.

http://forum.designcad.com/index.php?topic=1866.0

paulerens

#54
prl, thank you.
I adapted the code above on your advice.
It worked even without the adjustment, probably because Sys$(300) is always a string?

prl

Quote from: paulerens on May 05, 2012, 03:10:52 AM
It worked even without the adjustment, probably because Sys$(300) is always a string?

Interesting.  When I removed the sys(36)=2, Version 17.2 put up an error message with nam=sys$(300).

paulerens

In version 21, with Sys (36) = 0, no error message!
Strange, very strange.
Version 17 no longer installed.

Lar


MarkX

Quote from: paulerens on May 05, 2012, 01:28:55 AM
Mark,
If the macro runs the second time, the group is visible again and the entities are returned in their original layers.
Not tried, I think. ;D
Paul.
Hi Paul,

Sorry, I didn't know something different would happen if I ran it a second time.

Having work-arounds is nice, but its better if you can get simple things to work out-of-the-box.

I'd worry that the database, perhaps used by some other macro, would mess up the object layer order or worse, leave one out. Since the real need for this application is in 3D, leaving out solids is a non-starter.

The obvious solution is alive and well and living in France.

Mark