Author Topic: Insert DYN block  (Read 1431 times)

0 Members and 1 Guest are viewing this topic.

David Hall

  • Automatic Duh Generator
  • King Gator
  • Posts: 4075
Insert DYN block
« on: April 10, 2008, 01:07:27 PM »
Admittedly I am not a LISP or VLISP guy.  I know how to use very basic LISP, so I am asking for help from you gurus.  I have this
Code: [Select]
(defun blkInDB (blkname  layName);;;blkDBState
     (setvar "cmdecho" 0)
     (setq OldLayerName (getvar "clayer"))
     (command "-layer" "m" layName "")
     (command "-insert" blkname pause "1" "1" "0")
;;; set blkDBState here
     (setvar "clayer" OldLayerName)
     (setvar "cmdecho" 1)
     (princ)
     (princ)
     (princ)
)

which I would like to make work with dynamic blocks.  My VBA thread is proving to be a huge PITA, so I am looking to LISP to see if it can be done.  I know basically nothing about the VL stuff, so extreme guidance is needed if its possible.  As you can see from my code, there is a lot that can be improved.
Everyone has a photographic memory, Some just don't have film.
They say money can't buy happiness, but it can buy Bacon and that's a close second.
Sometimes the question is more important than the answer. (Thanks Kerry for reminding me)

Guest

  • Guest
Re: Insert DYN block
« Reply #1 on: April 10, 2008, 01:31:51 PM »

David Hall

  • Automatic Duh Generator
  • King Gator
  • Posts: 4075
Re: Insert DYN block
« Reply #2 on: April 10, 2008, 02:00:00 PM »
Thanks Matt, that is exactly what I was looking for.
Everyone has a photographic memory, Some just don't have film.
They say money can't buy happiness, but it can buy Bacon and that's a close second.
Sometimes the question is more important than the answer. (Thanks Kerry for reminding me)

Guest

  • Guest
Re: Insert DYN block
« Reply #3 on: April 10, 2008, 02:08:19 PM »
You're welcome!