Here is my thought process....lengthy and I apologize. I am just trying to explain my thought process. I don't want to have the app done for me....Ideas and code snippets to help me compile the whole thing. Again, I am hacking my way through this and I sincerely apologize to the code gurus.
One step at a time... So here we go.
We have symbols(blocks) we use on our drawings. There are various things that happen to those blocks when they are inserted into a drawing. I.e.
Insert point
Layer
Insertion Scale: (if space = model set insert scale to current value of dimscale if space = paper set insert scale to 1.0)
Rotation
Mirror
Attributes (show dialoge to enter attribute information)
Explode
Of course there is an error checking and restoration funciton.
So....
If:
Block1: do 1 2 3 4 5
Block2: do 2 5 4
Block3: do 1 4 5
...
Block88: do 1 2 3 5
etc....
I have attached an image of the basic idea for a layout of the VB app.
It would be nice to see an slide type view of the block to be inserted. I am also planning on using a "description" of the block in the "Block Description" area instead of the actual block name.
I may have to create some sort of "INI" style file to group the different types of descriptions. Not sure on this one. The idea is if you click on "Wood Columns" only wood column blocks would appear in the "Block Description" area.
The "Existing Item?" check box would make the block insert on our "EXST" layers. The "Current Dimscale" would just be a warm fuzzy "What are my current settings" type quck reference. There are others I would like to add to it, but I will learn that later.
I have attached an image of the app layout(work in progress).
Here is the code and that Kerry Brown basically wrote to set the insertion parameters and a sample menu lines that uses the routine.
Menu Line:
[BLOCK1]^C^C^P(BLKINS "LAYER1" "1" "CONTINUOUS" "BLOCK1" 1.0 0.0 nil nil nil)
Image Tile Menu Line:
[SLIDE-IMAGES(BLOCK1,BLOCK1 DESCRIPTION)]^C^C^P^P(BLKINS "LAYER1" "1" "CONTINUOUS" "BLOCK1" 1.0 0.0 nil nil nil)
(defun BLKINS (LA_NAM LA_COL LA_LT BLKNAM INSSCL ROT MIR ATTS EXP / INSPT)
(INITERR)
(setvar "cmdecho" 0)
(vl-load-com)
(command ".undo" "end")
(command ".undo" "m")
(setvar "cecolor" "bylayer")
(setvar "celtype" "bylayer")
(setvar "celweight" -1)
(setvar "snapmode" 0)
(setvar "attreq" 0)
;;;
(or INSSCL (setq INSSCL (getvar "dimscale")))
;;;
(setq INSPT (getpoint "\nPick Insertion Point: "))
;;;
(vl-cmdf ".-layer" "make" LA_NAM "thaw" LA_NAM "on" LA_NAM "color" LA_COL LA_NAM "lt" LA_LT LA_NAM "")
;;;
(if ROT
(vl-cmdf ".-insert" BLKNAM INSPT INSSCL INSSCL ROT)
(progn
(princ "\nRotation Angle: ")
(vl-cmdf ".-insert" BLKNAM INSPT INSSCL INSSCL pause)
)
)
;;;
(if MIR
(vl-cmdf ".mirror" (entlast) "" INSPT pause "y")
)
;;;
(if ATTS
(vl-cmdf ".ddatte" (entlast))
)
;;;
(if EXP
(vl-cmdf ".explode" (entlast))
)
;;;
(command ".undo" "end")
(RESET)
(princ)
)
Thanks