Author Topic: Visibility State creates Unique instance of Block?  (Read 5621 times)

0 Members and 1 Guest are viewing this topic.

JCTER

  • Guest
Visibility State creates Unique instance of Block?
« on: February 14, 2011, 05:57:46 PM »
I've not messed with DBlocks in a while.

Say I want to create a basic block with 4 Visibility States.  A, B, C, D.

If I have that block copied around in 16 places, with it set to:

A, 3 times
B, 5 times
C, 7 times
D, 1 time

Will I have 16 separate blocks (one for each case), under anonymous block names, or will I have only 4 block definitions?  

To be clear.. I want to make sure that a visibility-state block will not create a new, unique block definition for every single instance, even if it's -actually- a duplicate.

So will I have 4 blocks or 16, if I have 16 copies of a block with 4 visibility states?

I remember tackling this issue long ago, but I gotta jet, unfortunately, and am pretty balls-to-the-wall right now and can't research it thoroughly :(

Thanks in advance.

Jeff_M

  • King Gator
  • Posts: 4094
  • C3D user & customizer
Re: Visibility State creates Unique instance of Block?
« Reply #1 on: February 14, 2011, 06:17:42 PM »
You should have just 4. I just tested real quick with one of mine and whether I copied the original then changed the vis state, or changed the vis state then copied, it was the same Anonymous name for all having the same vis state.

JCTER

  • Guest
Re: Visibility State creates Unique instance of Block?
« Reply #2 on: February 14, 2011, 07:17:04 PM »
You should have just 4. I just tested real quick with one of mine and whether I copied the original then changed the vis state, or changed the vis state then copied, it was the same Anonymous name for all having the same vis state.
Thank you very much!

I had to run out and pick my son up from his day care, so I couldn't test it.  Don't have autocad at home right now.

I was hoping to be able to create a Dynamic Block for basic items like weld-flange, 90d elbow, 45d elbow, wye, and other simple piping items.  Just have a visibility state for pipe size.  We really only use 3, 4, 6, 8, and sometimes 10" pipe.  The hardware is also kinda limited.  Figured if I could make a DBlock for each item, i could fit everything on one tool pallete for easy drag'n'dropping for quick piping modeling.

...hopefully this idea just holds me over until I get the boss to buy CAD Werx.

Thanks for the confirmation Jeff. :)

Jeff_M

  • King Gator
  • Posts: 4094
  • C3D user & customizer
Re: Visibility State creates Unique instance of Block?
« Reply #3 on: February 26, 2011, 01:41:44 AM »
Well, bad news... While doing some programming involving DB's, I came across a case where I had 2 identical DB inserts (same Visibility state) but were differently named anonymous blocks. And changing them results in the anonymous names remaining unchanged. This directly contradicts what occurred in my first tests on this.

Perhaps what you are doing will still work as intended, just thought I should post these new findings.

Keith™

  • Villiage Idiot
  • Seagull
  • Posts: 16899
  • Superior Stupidity at its best
Re: Visibility State creates Unique instance of Block?
« Reply #4 on: February 26, 2011, 03:00:27 AM »
My understanding is that the way it is *supposed* to work is that each DB has a default display state - i.e. when you insert a DB named "stuff", it will indeed be named "stuff" - however, if you change the DB "stuff" to a different style, it is actually an anonymous insert referenced back to the original block "stuff".

At this point, that anonymous block "*U1" for example, is unique within the drawing, however, if you copy "stuff" again and change it to the exact state as "*U1", AutoCAD will actually create "*U2" - but if you copy "*U1", already in that particular state, it won't rename, *unless* you change the state of the block. If there is only one instance of "*U1", changing its state should not change its name.

Proud provider of opinion and arrogance since November 22, 2003 at 09:35:31 am
CadJockey Militia Field Marshal

Find me on https://parler.com @kblackie

Jeff H

  • Needs a day job
  • Posts: 6150
Re: Visibility State creates Unique instance of Block?
« Reply #5 on: February 26, 2011, 04:18:22 AM »
Depends, say you insert a DBlock with A,B,C,D visibilities parameters 16 times and A is default you will have
16 references from the 1 DBlock definition

If you then change
4 to B
4 to C
4 to D

you will now have
13 different block definitions
4 A's with Dblock as definition
1 B with *U1 as definition
1 B with *U2 as definition
..
..
Same for the C and D


If you insert 4 blocks
Leave 1 at default A
Change
1 to B
1 to C
1 to D
Then make 3 copies of each you end with 4 different definitions
4 A's with Dblock as definition
4 B's with *U1 as definition
4 C's with *U2 as definition
...

Now you take 4 inserted as default
Leave 3 at default and change 1 to B->C->D
You end up with 2 total
3 A's with Dblock
1 B->C->D with *U1


Start over with four
Leave 2 at default and
change 1 B & 1 to B->C->D
End up with four

Start over with four
change
1 to B
1 to C
1 to D
1 to B->C->D->A
End up with 9

If you change the same one multiple times it seems to add one for every other block that was changed plus 1