Author Topic: AcDbEntity  (Read 8617 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: 12924
  • 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: 12924
  • 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: 12924
  • 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: 12924
  • 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.