.NET
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

How not to show blocks name in block definition.

4 REPLIES 4
SOLVED
Reply
Message 1 of 5
ButterFlyShame
555 Views, 4 Replies

How not to show blocks name in block definition.

Hello all, Is there any way not to show a particular block in block definition table ?

Could somebody give me a tip or something.

 My program bring a  block into drawing  thru a user form . And set some Xdata to it after insertion . If user bring the

block manually into drawing then how would we know  which one has xdata and which one doesn't. I came to this

solution to hide it in block definition list. Any Idea or better approach  ?

Cheers .

 

 

4 REPLIES 4
Message 2 of 5

That's known as an anonymous block. Set the BlockReference.Name to "*U" when you add the BlockTable.

 

Cheers,

Stephen Preston
Autodesk Developer Network
Message 3 of 5

Thanks Stephen. That works . Great.

 

Message 4 of 5
arcticad
in reply to: ButterFlyShame

One method I use to validate the input is have a dictionary entry in the drawing that I create. This will contain the handle's of the blocks that I have inserted in the drawing. Then if someone copies one or inserts there own then I will know.  I've also stored the insertion point so i will know if the object was moved.

---------------------------



(defun botsbuildbots() (botsbuildbots))
Message 5 of 5
dgorsman
in reply to: arcticad

If you're going to create the Dictionary object to begin with, might as well dispose of the block as well.  😉

 

I've run into problems with "invisible data blocks" from a variety of professionally developed applications before.  As users copy/paste, insert/explode, make their own blocks using the application instead of plain AutoCAD, etc., copies of those data blocks can proliferate into every corner of your DWG universe.  Hence, standard procedure for my own applications is to store such data in extension dictionaries under the NamedObjectDictionary.  Invisible to the casual user, non-toxic to other organizations that may get the drawing, and easily removed.

----------------------------------
If you are going to fly by the seat of your pants, expect friction burns.
"I don't know" is the beginning of knowledge, not the end.


Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk DevCon in Munich May 28-29th


Autodesk Design & Make Report

”Boost