Author Topic: "Assoc" #'s  (Read 2730 times)

0 Members and 1 Guest are viewing this topic.

DanB

  • Bull Frog
  • Posts: 367
"Assoc" #'s
« on: April 04, 2005, 12:37:32 PM »
Here's a snipet of code from another post here on the forums..(Thanks CAB)
Code: [Select]

   ((= (cdr (assoc 0 (entget ename))) "ARC")
         (prompt "\nObject is an Arc, Try again.")


Is there any sort of list out there that breakdowns what each "assoc" relates too? (i.e. in the above example, assoc 0 relates to the object type being an "arc") I know you are able to extract such things as start and end or center point from the "assoc" values, maybe someone can help expand on this?

MP

  • Seagull
  • Posts: 17750
  • Have thousands of dwgs to process? Contact me.
"Assoc" #'s
« Reply #1 on: April 04, 2005, 12:44:11 PM »
Try this. For example, this.

You may also wish to explore the activex side of visual lisp, more illuminating. For example, this:

Code: [Select]
(if (setq ename (car (entsel)))
   (vlax-dump-object (vlax-ename->vla-object ename) t)
)

Might spew this:
Code: [Select]
; IAcadArc: AutoCAD Arc Interface
; Property values:
;   Application (RO) = #<VLA-OBJECT IAcadApplication 00b07a68>
;   ArcLength (RO) = 146.28
;   Area (RO) = 3066.1
;   Center = (167.938 96.935 0.0)
;   Color = 256
;   Document (RO) = #<VLA-OBJECT IAcadDocument 010c7e1c>
;   EndAngle = 2.39046
;   EndPoint (RO) = (119.035 142.597 0.0)
;   Handle (RO) = "2B"
;   HasExtensionDictionary (RO) = 0
;   Hyperlinks (RO) = #<VLA-OBJECT IAcadHyperlinks 0114ca64>
;   Layer = "0"
;   Linetype = "ByLayer"
;   LinetypeScale = 1.0
;   Lineweight = -1
;   Normal = (0.0 0.0 1.0)
;   ObjectID (RO) = 1074253144
;   ObjectName (RO) = "AcDbArc"
;   OwnerID (RO) = 1074253048
;   PlotStyleName = "ByLayer"
;   Radius = 66.9071
;   StartAngle = 0.20414
;   StartPoint (RO) = (233.456 110.499 0.0)
;   Thickness = 0.0
;   TotalAngle (RO) = 2.18632
;   Visible = -1
; Methods supported:
;   ArrayPolar (3)
;   ArrayRectangular (6)
;   Copy ()
;   Delete ()
;   GetBoundingBox (2)
;   GetExtensionDictionary ()
;   GetXData (3)
;   Highlight (1)
;   IntersectWith (2)
;   Mirror (2)
;   Mirror3D (3)
;   Move (2)
;   Offset (1)
;   Rotate (2)
;   Rotate3D (3)
;   ScaleEntity (2)
;   SetXData (2)
;   TransformBy (1)
;   Update ()
Engineering Technologist • CAD Automation Practitioner
Automation ▸ Design ▸ Drafting ▸ Document Control ▸ Client
cadanalyst@gmail.comhttp://cadanalyst.slack.comhttp://linkedin.com/in/cadanalyst

daron

  • Guest
"Assoc" #'s
« Reply #2 on: April 04, 2005, 01:26:27 PM »
or some dxf style dumping would be:
Code: [Select]
(entget (car entsel "\nSelect an object to dump: ")))
You can set it to a function yourself and add any error trapping you want.

MP

  • Seagull
  • Posts: 17750
  • Have thousands of dwgs to process? Contact me.
"Assoc" #'s
« Reply #3 on: April 04, 2005, 01:52:38 PM »
This tool might prove helpful as you learn dxf codes and activex properties.
Engineering Technologist • CAD Automation Practitioner
Automation ▸ Design ▸ Drafting ▸ Document Control ▸ Client
cadanalyst@gmail.comhttp://cadanalyst.slack.comhttp://linkedin.com/in/cadanalyst

MP

  • Seagull
  • Posts: 17750
  • Have thousands of dwgs to process? Contact me.
"Assoc" #'s
« Reply #4 on: April 04, 2005, 02:06:51 PM »
Engineering Technologist • CAD Automation Practitioner
Automation ▸ Design ▸ Drafting ▸ Document Control ▸ Client
cadanalyst@gmail.comhttp://cadanalyst.slack.comhttp://linkedin.com/in/cadanalyst

DanB

  • Bull Frog
  • Posts: 367
"Assoc" #'s
« Reply #5 on: April 05, 2005, 07:40:22 AM »
Haven't tried the "tool" yet but thanks for sharing all of this information. I just downloaded the PDF references, appreciate all the feedback guys.

Dan

CAB

  • Global Moderator
  • Seagull
  • Posts: 10401
"Assoc" #'s
« Reply #6 on: April 05, 2005, 08:19:49 AM »
MP

Those are some great links.

Thanks
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.

MP

  • Seagull
  • Posts: 17750
  • Have thousands of dwgs to process? Contact me.
"Assoc" #'s
« Reply #7 on: April 14, 2005, 10:48:42 AM »
Thanks Charles (didn't see this post).
Engineering Technologist • CAD Automation Practitioner
Automation ▸ Design ▸ Drafting ▸ Document Control ▸ Client
cadanalyst@gmail.comhttp://cadanalyst.slack.comhttp://linkedin.com/in/cadanalyst