Continue to Site

Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

  • Congratulations IDS on being selected by the Eng-Tips community for having the most helpful posts in the forums last week. Way to Go!

to display a AcDbEntity drived Entity in AutoCAD 1

Status
Not open for further replies.

PeterParis

Computer
Dec 18, 2003
3
In an ObjectARX Application, I drived myEntity from AcDbEntity.
In order to diaplay myEntity in an AutoCAD window, is it the only way to add the instance of myEntity into the WorkingDataBase?
It is not quite I want.
I want to show an instance of myEntity, only after verifing that it's correct, do I want it become persistant in AutoCAD DataBase.
 
Replies continue below

Recommended for you

You could create a block object of the entity and then if you are satified with it, you could turn it to a block reference object in model/paper space? One way.

"Whether you think that you can, or that you can't, you are usually right "
.. Henry Ford
 
Thank you bourunit, I have waited for 21 days!!
I'm a beginner of AutoCAD.
You said creating a block object, do you mean that creating a block in the WorkingDataBase to hold the instance of myEntity?
In fact, what I do actually is appending myEntity to the BlockTableRecord (that is the ModelSpace) of the workingDatabase.
So that I can display myEntity.
But it seems that when I erase myEntity, it still takes the place in the Database. That's not what I want, since myEntity takes a lot of memory.

 
Okay, I see. You need to understand how AutoCAD keeps block information. There are two places and two kinds of blocks in AutoCAD. The first is the Block object: the block object is the raw data about the block (its definition you might say). When you do an Insert and then scroll down the list of blocks to insert, this is the Block Table you are seeing. You can have a block in the block table, but not have it inserted into the drawing yet. The next kind of block is the Block Reference. The Block Reference is the block from the block table inserted into the actual drawing somewhere (has properties like insert point, layer, X and Y factors, space, etc..). This is how you can have multiple inserts of the same block. They look to the block table to get the blocks info. Anyway, it sounds like you are inserting a block reference into the drawing (which automatically creates a block table entry) and then are deleting the block reference from the drawing. The only thing you need to do is to purge the block from the block table (as long as it is not inserted or referenced in the drawing somewhere still). I hope this helps.

"Whether you think that you can, or that you can't, you are usually right "
.. Henry Ford
 
I'm ashamed to say that I know hardly anything about the block reference, insert point etc. I only blindly append myEntity into the modelspace and have it displayed.
I'll try to purge the workingDatabase after erasing myEntity, to see if I recovery the memory. And I have to look at the document to learn about the block.
Thank you very much borgunit.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor