Author Topic: Problem with xrecods attached to entity  (Read 1286 times)

0 Members and 1 Guest are viewing this topic.

Amsterdammed

  • Guest
Problem with xrecods attached to entity
« on: January 29, 2013, 12:28:06 PM »
Hello there,

i thought i had it, but sometimes i can't extract the xrecords the vertical i work with attaches to objects to store data.

I use
Code: [Select]
(if (cdr (assoc 360 el_np))
            (IF (and (CDR (ASSOC 102 el_np))
                     (assoc 360 (ENTGET (cdr (assoc 360 el_np))))
                     ) ;_ end of and
              (PROGN
                (setq dic
                       (entget
                         (cdr (assoc 360
                                     (ENTGET (cdr (assoc 360 el_np)))
                                     ) ;_ end of assoc
                              ) ;_ end of cdr
                         ) ;_ end of entget
                      ) ;_ end of setq
                (WHILE (SETQ DICT (CDR (ASSOC 360 DIC)))
                  (setq NAME (CDR (ASSOC 3 DIC)))
                  (setq DIC (CDR (MEMBER (ASSOC 360 DIC) DIC)))
                  (sETQ XREC (ENTGET DICT))
                  (SETQ
                    DATA (APPEND
                           DATA
                           (LIST
                             (APPEND
                               (LIST NAME)
                               (CDR (MEMBER '(100 . "AcDbXrecord")
                                            XREC
                                            ) ;_ end of MEMBER
                                    ) ;_ end of CDR
                               ) ;_ end of APPEND
                             ) ;_ end of LIST
                           ) ;_ end of APPEND
                    ) ;_ end of SETQ
                  ) ;_ end of WHILE
                ) ;_ end of PROGN
              ) ;_ end of IF
            )


i wonder, is there a better, more sophisticated way to extract from the attached object? or what is wrong in my code that makes it not work sometimes?

Thanks

Bernd

jbuzbee

  • Swamp Rat
  • Posts: 851
Re: Problem with xrecods attached to entity
« Reply #1 on: January 29, 2013, 12:53:13 PM »
Which vertical?

In Architecture (ADT) I had to use VLisp to access the "Style" object.
James Buzbee
Windows 8

Amsterdammed

  • Guest
Re: Problem with xrecods attached to entity
« Reply #2 on: January 29, 2013, 01:47:56 PM »
it is techline form CADAC, a Dutch thing we work with



CAB

  • Global Moderator
  • Seagull
  • Posts: 10401
Re: Problem with xrecods attached to entity
« Reply #3 on: January 29, 2013, 02:15:16 PM »
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.

Amsterdammed

  • Guest
Re: Problem with xrecods attached to entity
« Reply #4 on: February 01, 2013, 09:51:17 AM »
looked put didn't get any wiser.....


Amsterdammed

  • Guest
Re: Problem with xrecods attached to entity
« Reply #5 on: February 01, 2013, 10:25:31 AM »
not working object


Code: [Select]
((-1 . <Entity name: 7ffff3cc190>)
  (0 . "DICTIONARY")
  (5 . "91")
  (102 . "{ACAD_REACTORS")
  (330 . <Entity name: 7ffff3cc180>)
  (102 . "}")
  (330 . <Entity name: 7ffff3cc180>)
  (100 . "AcDbDictionary")
  (280 . 1)
  (281 . 1)
  (3 . "SPATIAL")
  (360 . <Entity name: 7ffff3cc1a0>)
  )


working object


Code: [Select]

((-1 . <Entity name: 7ffff370330>)
  (0 . "DICTIONARY")
  (5 . "19B")
  (102 . "{ACAD_REACTORS")
  (330 . <Entity name: 7ffff370320>)
  (102 . "}")
  (330 . <Entity name: 7ffff370320>)
  (100 . "AcDbDictionary")
  (280 . 1)
  (281 . 1)
  (3 . "Nordined.Technics.Conn.1")
  (360 . <Entity name: 7ffff370340>)
  (3 . "Nordined.Technics.Conn.2")
  (360 . <Entity name: 7ffff370350>)
  )



what i see is the "Spatial" dic in the not working object. the vertical has no problem with the object, so they seem to read the xrecord different than i do (of course they don't tell me...). so what do i miss here?????