Author Topic: xdata retrieval... what's wrong  (Read 1683 times)

0 Members and 1 Guest are viewing this topic.

uncoolperson

  • Guest
xdata retrieval... what's wrong
« on: April 21, 2006, 04:36:41 PM »
I'm trying this out for the first time... errrr, can't figure out why it seems like it's putting the data with the ent... but then it's not there

Code: [Select]
(DEFUN setframe (text frame)
  (if (not (tblsearch "APPID" "FRAMEFUN"))
  (regapp "FRAMEFUN")
  )
  (REGAPP "FRAMEFUN")
  (SETQ text-ent (ENTGET text))
  (SETQ data (LIST
(LIST -3
       (LIST "FRAMEFUN"
     (CONS 1005 (CDR (ASSOC 5 (ENTGET frame))))
       )
)
       )
  )
  (IF (= (ASSOC -3 text-ent) nil)
    (SETQ new-ent (APPEND text-ent data))
    (SETQ new-ent (SUBST (ASSOC -3 text-ent) data text-ent))
  )
  (ENTMOD new-ent)
)

(DEFUN getframe (text)
  (SETQ data (CDR (CADR (CADR (ASSOC -3 (ENTGET text))))))
  (HANDENT data)
)
« Last Edit: April 21, 2006, 05:12:22 PM by CAB »

CAB

  • Global Moderator
  • Seagull
  • Posts: 10401
Re: xdata vanmilla lisp like... what's wrong
« Reply #1 on: April 21, 2006, 05:01:20 PM »
Try this:
Code: [Select]
(DEFUN getframe (text)
  (SETQ data (CDR (CADR (CADR (ASSOC -3 (ENTGET text'("FRAMEFUN")))))))
  (HANDENT data)
)
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.

JohnK

  • Administrator
  • Seagull
  • Posts: 10653
Re: xdata vanmilla lisp like... what's wrong
« Reply #2 on: April 21, 2006, 05:02:27 PM »
Ok, if i can see the spelling mistakes in your thread title, you know its really screwed up.
TheSwamp.org (serving the CAD community since 2003)
Member location map - Add yourself

Donate to TheSwamp.org

uncoolperson

  • Guest
Re: xdata vanmilla lisp like... what's wrong
« Reply #3 on: April 21, 2006, 05:05:50 PM »
hey vanmilla is fun...


thanks CAB... you know it points that out in the help file, and I... I , i guess i just skipped that part.

Thank agian