From: Corbin Siddall
Subject: "Dynamic User Block Library" - DynBlkLib.zip (0/1)
Date: 
Message-ID: <34e3d783.55254279@news.netnitco.net>
Hello all,

	I am new to the realm of AutoLISP programming.  However I
have written a little LSP routine that allows multiple people on a 
network 'share' blocks amongst each other in an easy fasion.

	Once properly installed a GUI will appear that contains
multiple 'BOOKS' (one for each user on the netowrk).  And
multiple 'PAGES' each book has (15) pages.  Each page then
can store (9) blocks.

	The blocks are generated using wblock and a slide
of the block is actually displayed for easy reference and selection.
All users on the network can access each other's books and pages.
Block descriptions can be added/retrieved as well as PAGE
descriptions...so you can keep all block of the same category
together.

	This was my first go at autolisp programming.  So all the
code is really 'HACKED' together, but our engineering dept. has
been using it for weeks.  Make sure to open, and read the begining of
the file  BLKSELG.LSP, it contains more instructions on the
installation, however a basic understanding of ACAD should allow you
to get this up and running..

	If you have suggestions for me please let me know!

Corbin Siddall
········@mcdanilefire.com

McDaniel Fire Systems
Special Hazards
Mechanical Engineering

;
From: Tony Tanzillo
Subject: Re: "Dynamic User Block Library" - DynBlkLib.zip (0/1)
Date: 
Message-ID: <6etl2d$20u@bgtnsc03.worldnet.att.net>
Hi - Corbin. This is probably not the best place to post
your AutoLISP programs. This NG is where more general LISP
related topics are discussed outside of the realm of using
it as an embedded macro language in AutoCAD. You'll find
a bit more discussion of AutoLISP over in comp.cad.autocad.

But, I took a quick peek at it, and only want to offer
the following advice, regarding this:

(mapcar 'mode_tile '("pag1" "pag2" "pag3" "pag4" "pag5" "pag6" "pag7" "pag8"
"pag9" "pag10" "pag11" "pag12" "pag13" "pag14" "pag15" "xpl" "rot" "scl" "del"
"pdcn" "chpagd" "wblk" "cpy" "mov" "inf" "nam1" "nam2" "nam3" "nam4" "nam5"
"nam6" "nam7" "nam8" "nam9" "nam10" "nam11" "nam12") '(0 0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0))

The need to pass a list of redundant values to mapcar can be
eliminated by using (lambda), which allows you to specify a
procedure that is to be applied to each element in the first
list.

So, you can do this instead:

(mapcar
   '(lambda (tile)
       (mode_tile tile 0)
    )
   '("pag1" "pag2" ........ "nam11" "nam12")
)

Further, since you're not interested in the result of
each call to mode_tile, you can just use (foreach):

(foreach tile '("pag1" "pag2" ........ "nam11" "nam12")
   (mode_tile tile 0)
)

Best regards,

Tony Tanzillo

--

Corbin Siddall wrote in message <·················@news.netnitco.net>...
>
>Hello all,
>
> I am new to the realm of AutoLISP programming.  However I
>have written a little LSP routine that allows multiple people on a
>network 'share' blocks amongst each other in an easy fasion.
>
> Once properly installed a GUI will appear that contains
>multiple 'BOOKS' (one for each user on the netowrk).  And
>multiple 'PAGES' each book has (15) pages.  Each page then
>can store (9) blocks.
>
> The blocks are generated using wblock and a slide
>of the block is actually displayed for easy reference and selection.
>All users on the network can access each other's books and pages.
>Block descriptions can be added/retrieved as well as PAGE
>descriptions...so you can keep all block of the same category
>together.
>
> This was my first go at autolisp programming.  So all the
>code is really 'HACKED' together, but our engineering dept. has
>been using it for weeks.  Make sure to open, and read the begining of
>the file  BLKSELG.LSP, it contains more instructions on the
>installation, however a basic understanding of ACAD should allow you
>to get this up and running..
>
> If you have suggestions for me please let me know!
>
>Corbin Siddall
>········@mcdanilefire.com
>
>McDaniel Fire Systems
>Special Hazards
>Mechanical Engineering
>
>;