Author Topic: getting attributes of a DB using LISP  (Read 1297 times)

0 Members and 1 Guest are viewing this topic.

soory

  • Guest
getting attributes of a DB using LISP
« on: February 08, 2011, 11:48:39 AM »
I'm trying to write my first code to insert a DB and get attributes of it. I wrote this:

Code: [Select]
(vl-load-com)
(defun c:abcd (/ p1 blkname en eo dblist dbprops)
(setq blkname "prac2")
(setq p1 (getpoint "\ninsert piont:"))
(command "insert"
BlkName
1.0
1.0
1.0
0.0
)
(setq en (entsel "\nselect block:"))
(setq eo (vlax-ename->vla-object (car en)))
(setq dblist (vlax-invoke eo 'GetDynamicBlockProperties))
(princ)
)

The block inserted properly but getting attributes does not go through.
Any help would be appriciated.
 :?


<edit: CAB - code tags added>
« Last Edit: February 08, 2011, 12:55:01 PM by CAB »

CAB

  • Global Moderator
  • Seagull
  • Posts: 10401
Re: getting attributes of a DB using LISP
« Reply #1 on: February 08, 2011, 12:56:33 PM »
Welcome to the Swamp.  8-)
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.

alanjt

  • Needs a day job
  • Posts: 5352
  • Standby for witty remark...
Re: getting attributes of a DB using LISP
« Reply #2 on: February 08, 2011, 01:07:11 PM »
Code: [Select]
(vlax-invoke (vlax-ename->vla-object (car (entsel))) 'GetAttributes)
Civil 3D 2019 ~ Windohz 7 64bit
Dropbox

Lee Mac

  • Seagull
  • Posts: 12914
  • London, England