Author Topic: AcDbEntity  (Read 8654 times)

0 Members and 1 Guest are viewing this topic.

Lerner

  • Newt
  • Posts: 33
AcDbEntity
« on: January 30, 2010, 11:43:31 PM »
Don't all entities have AcDbEntity subclass? If so, why do you have to specify (100 . "AcDbEntity") in entmake? Can it ever be anything different? Seems completely redundant to me.

Kerry

  • Mesozoic relic
  • Seagull
  • Posts: 11654
  • class keyThumper<T>:ILazy<T>
Re: AcDbEntity
« Reply #1 on: January 31, 2010, 02:47:06 AM »
yes,  AcDbEntity is the base class for the definition.
I'd guess that 25 years ago when they designed the model someone decided to play it safe and include the base object in the definition.
kdub, kdub_nz in other timelines.
Perfection is not optional.
Everything will work just as you expect it to, unless your expectations are incorrect.
Discipline: None at all.

gile

  • Gator
  • Posts: 2520
  • Marseille, France
Re: AcDbEntity
« Reply #2 on: January 31, 2010, 06:39:11 AM »
Hi,

You can also entmake objects which aren't entities (AcDbEntity), i.e. dictionaries class is AcDbDictionary.
Speaking English as a French Frog

Lerner

  • Newt
  • Posts: 33
Re: AcDbEntity
« Reply #3 on: January 31, 2010, 08:21:35 AM »
Ah, right you are.
(entmake '((0 . "DICTIONARY") (100 . "AcDbDictionary")))

Lee Mac

  • Seagull
  • Posts: 12926
  • London, England
Re: AcDbEntity
« Reply #4 on: January 31, 2010, 08:33:34 AM »
Also:  AcDbPlotSettings, AcDbFilter, AcDbBlockTableRecord...

CAB

  • Global Moderator
  • Seagull
  • Posts: 10401
Re: AcDbEntity
« Reply #5 on: January 31, 2010, 11:34:21 AM »
You do not have to use (100 . "AcDbEntity") in entmake for many entities.
I've reached the age where the happy hour is a nap. (°¿°)
Windows 10 core i7 4790k 4Ghz 32GB GTX 970
Please support this web site.

CAB

  • Global Moderator
  • Seagull
  • Posts: 10401
Re: AcDbEntity
« Reply #6 on: January 31, 2010, 11:40:10 AM »
I've reached the age where the happy hour is a nap. (°¿°)
Windows 10 core i7 4790k 4Ghz 32GB GTX 970
Please support this web site.

Kerry

  • Mesozoic relic
  • Seagull
  • Posts: 11654
  • class keyThumper<T>:ILazy<T>
Re: AcDbEntity
« Reply #7 on: January 31, 2010, 02:14:37 PM »

My recollection (may not be correct) is that the (100 . "AcDbEntity") is mandatory for entities introduced in and after R13.
kdub, kdub_nz in other timelines.
Perfection is not optional.
Everything will work just as you expect it to, unless your expectations are incorrect.
Discipline: None at all.

CAB

  • Global Moderator
  • Seagull
  • Posts: 10401
Re: AcDbEntity
« Reply #8 on: January 31, 2010, 03:56:22 PM »
Have you tried this?
Code: [Select]
(entmakex (list (cons 0 "LINE") (cons 10 (list 0.0 0.0 0.0)) (cons 11 (list 0.0 1.0 0.0))))
I've reached the age where the happy hour is a nap. (°¿°)
Windows 10 core i7 4790k 4Ghz 32GB GTX 970
Please support this web site.

Lee Mac

  • Seagull
  • Posts: 12926
  • London, England
Re: AcDbEntity
« Reply #9 on: January 31, 2010, 04:00:52 PM »
From Help:

Quote
For legacy reasons, entmake ignores DXF group code 100 data for the following entity types:

AcDbText
AcDbAttribute
AcDbAttributeDefinition
AcDbBlockBegin
AcDbBlockEnd
AcDbSequenceEnd
AcDbBlockReference
AcDbMInsertBlock
AcDb2dVertex
AcDb3dPolylineVertex
AcDbPolygonMeshVertex
AcDbPolyFaceMeshVertex
AcDbFaceRecord
AcDb2dPolyline
AcDb3dPolyline
AcDbArc
AcDbCircle
AcDbLine
AcDbPoint
AcDbFace
AcDbPolyFaceMesh
AcDbPolygonMesh
AcDbTrace
AcDbSolid
AcDbShape
AcDbViewport

Lerner

  • Newt
  • Posts: 33
Re: AcDbEntity
« Reply #10 on: January 31, 2010, 05:57:44 PM »
Excellent Lee. I must have missed that. I was wondering if there was a list like that and all I had to do was look! Thanks.

CAB, you don't have to use it for all entities (those above), but it is still implied and gets added automatically. My original question was really why isn't it just implied for all entities.
« Last Edit: January 31, 2010, 06:27:25 PM by Lerner »

Lee Mac

  • Seagull
  • Posts: 12926
  • London, England
Re: AcDbEntity
« Reply #11 on: January 31, 2010, 06:11:40 PM »
Excellent Lee. I must have missed that. I've been looking for a list like that. Thanks.

You're welcome. It can be found under the article on 'entmake'  :-)

CAB

  • Global Moderator
  • Seagull
  • Posts: 10401
Re: AcDbEntity
« Reply #12 on: February 01, 2010, 12:16:15 AM »
Maybe there is software out there or in ACAD that still looks for (100 . "AcDbEntity") and without it would fail.
I've reached the age where the happy hour is a nap. (°¿°)
Windows 10 core i7 4790k 4Ghz 32GB GTX 970
Please support this web site.

Lee Mac

  • Seagull
  • Posts: 12926
  • London, England
Re: AcDbEntity
« Reply #13 on: February 01, 2010, 05:43:49 AM »
Maybe there is software out there or in ACAD that still looks for (100 . "AcDbEntity") and without it would fail.


MText fails without it  :wink:

Kerry

  • Mesozoic relic
  • Seagull
  • Posts: 11654
  • class keyThumper<T>:ILazy<T>
Re: AcDbEntity
« Reply #14 on: February 01, 2010, 06:05:07 AM »

Thats because Mtext was introduced in R13
Refer my earlier post
kdub, kdub_nz in other timelines.
Perfection is not optional.
Everything will work just as you expect it to, unless your expectations are incorrect.
Discipline: None at all.

Lee Mac

  • Seagull
  • Posts: 12926
  • London, England
Re: AcDbEntity
« Reply #15 on: February 01, 2010, 06:26:37 AM »

Thats because Mtext was introduced in R13
Refer my earlier post


Oooo... get you  :evil:  8-)

Lerner

  • Newt
  • Posts: 33
Re: AcDbEntity
« Reply #16 on: February 01, 2010, 08:47:57 PM »
I have wondered at what version different entities were introduced at since reading this post which also mentions R13. It doesn't matter so much after the list Lee posted because entmake requires code 100 subclass marker groups for anything not on that list. But I did manage to find this which might be of interest to someone. I haven't examined it very closely to see how complete it is, since as I said, Lee's list is more definitive.

3DSOLID            R13
BODY               R13
ELLIPSE            R13
HATCH              R13
HELIX              2007
IMAGE              R13
LEADER             R13
LWPOLYLINE         R13
MLINE              R13
MTEXT              R13
OLEFRAME           R13
OLEFRAME2          R13
RAY                R13
REGION             R13
SECTION            2007
RTEXT              R13
SPLINE             R13
SUN                2007
SURFACE            2007
TABLE              2006
TOLERANCE          R13
UNDERLAY           2006
WIPEOUT            R13
XLINE              R13

Lee Mac

  • Seagull
  • Posts: 12926
  • London, England
Re: AcDbEntity
« Reply #17 on: February 01, 2010, 08:49:15 PM »
Interesting List Lerner, thanks for that   :-)

jbuzbee

  • Swamp Rat
  • Posts: 851
Re: AcDbEntity
« Reply #18 on: February 02, 2010, 07:21:39 PM »
Lee Mac,

is that you in your Avatar? Do you ride / race?
James Buzbee
Windows 8

Lee Mac

  • Seagull
  • Posts: 12926
  • London, England
Re: AcDbEntity
« Reply #19 on: February 02, 2010, 07:23:27 PM »
Lee Mac,

is that you in your Avatar? Do you ride / race?

Hey James

Not me in the avatar, but yeah I ride a CBR600F - see here, also, my Dad tunes race bikes  :-)

Do you ride?
« Last Edit: February 02, 2010, 07:28:29 PM by Lee Mac »

Lerner

  • Newt
  • Posts: 33
Re: AcDbEntity
« Reply #20 on: February 11, 2010, 09:47:11 PM »
It's amazing what you find in the AutoCAD documentation if you look. I ran across this item which basically is another way of presenting the same information found under entmake.

The following table identifies the entities that do not require subentity marker entries in the list passed to entmake:

DXF names of entities introduced prior to AutoCAD Release 13
3DFACE
ARC
ATTDEF
ATTRIB
CIRCLE
DIMENSION
INSERT
LINE
POINT
POLYLINE (old-style)
SEQEND
SHAPE
SOLID
TEXT
TRACE
VERTEX
VIEWPORT


Lee Mac

  • Seagull
  • Posts: 12926
  • London, England
Re: AcDbEntity
« Reply #21 on: February 12, 2010, 11:46:43 AM »
Is that like my list in #9?  :-)

Lerner

  • Newt
  • Posts: 33
Re: AcDbEntity
« Reply #22 on: February 16, 2010, 08:29:07 AM »
Yes, as I say it is essentially the same information, but it seems to list the actual entity names rather then the subclass marker names as it does under entmake. I found it in another place and thought I'd post it for completeness.

Lee Mac

  • Seagull
  • Posts: 12926
  • London, England
Re: AcDbEntity
« Reply #23 on: February 16, 2010, 11:19:57 AM »
Yes, as I say it is essentially the same information, but it seems to list the actual entity names rather then the subclass marker names as it does under entmake. I found it in another place and thought I'd post it for completeness.


Good call.  :-)