×
INTELLIGENT WORK FORUMS
FOR ENGINEERING PROFESSIONALS

Log In

Come Join Us!

Are you an
Engineering professional?
Join Eng-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Eng-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Jobs

to display a AcDbEntity drived Entity in AutoCAD

to display a AcDbEntity drived Entity in AutoCAD

to display a AcDbEntity drived Entity in AutoCAD

(OP)
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.

RE: to display a AcDbEntity drived Entity in AutoCAD

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

RE: to display a AcDbEntity drived Entity in AutoCAD

(OP)
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.

RE: to display a AcDbEntity drived Entity in AutoCAD

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

RE: to display a AcDbEntity drived Entity in AutoCAD

(OP)
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.

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Eng-Tips Forums free from inappropriate posts.
The Eng-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Eng-Tips forums is a member-only feature.

Click Here to join Eng-Tips and talk with other members!


Resources