invisible text

invisible text

fieldguy
Advisor Advisor
1,387 Views
2 Replies
Message 1 of 3

invisible text

fieldguy
Advisor
Advisor

I have a dwg file that contains 440 dbtext objects in model space but I can't see any of them.  They all have content - the text string is not empty.

 

I can change style, height, colour, and contents but I still can't see them.  CTRL-A selects nothing. Quick select says there are no objects in the current drawing. 

 

This file is used as a template and I am trying to explain to co-workers where these objects are coming from every time a new dwg is created.  I can't upload the dwg - there is proprietary content.

 

Since I can find them using the API, I am hoping there is a way to make them visible / selectable.

 

 

 

0 Likes
Accepted solutions (1)
1,388 Views
2 Replies
Replies (2)
Message 2 of 3

SENL1362
Advisor
Advisor

Any entity has the property .Visible, that may be false so it is not visible nor selectable.

How are these objects beeing made?

Can you show us one of these objects, export to DXF for example.

How dit you found these 440 objects?

What criteria to select only those 440 from the rest?

I suppose it has nothing to do with Layers beeing off/frozen etc?

 

0 Likes
Message 3 of 3

fieldguy
Advisor
Advisor
Accepted solution

I checked the .IsErased and the .Visible property.

I have no idea how they were made - I expect remnants of block explosions, etc.

This is supposed to be an empty template.  When I hear *empty*, I expect to be able to purge everything that is purgeable. If something won't purge and I think it should, I will find out why.

I found these by cycling through blocktable to get blocktablerecords, then blocktablerecords to find entities.

There is no criteria - everything else is gone.  I count 440 objects, and 440 of them are dbtext.

 

I did get a partial solution using this gem from @_gile (thank you!).  This provides my evidence of a corrupt template. During the process above, I add to an objectid collection.

 

using (acdb.Database target = new acdb.Database(true, true))
{
acdb.IdMapping newmap = new acdb.IdMapping();
acdb.ObjectId tms = acdb.SymbolUtilityServices.GetBlockModelSpaceId(target);
acdb.Database source = oids[0].Database;
source.WblockCloneObjects(oids, tms, newmap, acdb.DuplicateRecordCloning.Ignore, false);
target.SaveAs("invisible_text.dwg", acdb.DwgVersion.Current);
}

 

This is close enough to a solution for me.  

0 Likes