(if (not AH:Butts)(load "Multi Radio buttons.lsp"))
(if (not AHlstbox)(load "Listbox-AH.lsp"))
(if (= but nil)(setq but 1))
(setq ans (ah:butts but "v" '("Steves cable tray" "Ligth duty " "Medium duty" "heavy duty" "Extra heavy")))
(setq ans2 (ah:butts but "V" '("Steves cable tray" "Straight Run" "Flat elbow 90" "Equal Tee" "reducing tee" "Straight reducer")))
(setq ans3 (ahlstbox "Pick size" (list "size1" "size 2" "size 3" "size 4") 20 10))
(defun _csv->lst ( str / pos )
(if (setq pos (vl-string-position 44 str))
(cons (substr str 1 pos) (_csv->lst (substr str (+ pos 2))))
(list str)
)
)
(setq lst '())
(while (setq newline (read-line fname))
(setq newlst ( _csv->lst newline))
(setq lst (cons newlst lst))
)
(setq alst (list (list "100" "100xd") (list "200" "200xd")(list "300" "300xd")))
(setq lst2 '())
(foreach item alst
(setq lst2 (cons (car item) lst2))
)
(setq lst2 (reverse lst2))
(setq ans (AT:ListSelect "title" "label" 25 30 "false" lst2))
(setq x 0)
(foreach item alst
(if (= (car ans)(car item))
(setq dwgname (cadr (nth x alst)))
(setq x (+ x 1))
)
)
(defun
INSERT_BLOCK ()
(setq
DGN (nth 1 SIZE_DIMS)
) ;end setq
(command "._-insert" DGN pt 1 1 0
) ;_ end of command
For me the old fashioned way a picture pick, this is using a menu very simple and slide images of your blocks, autocad does the coding for you, have a look at the image. Want more info just ask.Is this DCl yours or what?
Is this DCl yours or what?
QuoteIs this DCl yours or what?
This one?
(https://serving.photos.photobox.com/657356651f0ba1ed71be85fa5603498293e1ee142bafa5aaa781f46e674f3bec21525eb3.jpg)
Yes
(if (= NEWTILE "ldct1")
(INSERT_BLOCK1) ;GOTO INSERT BLOCK 1
) ;_ end of if
(if (= NEWTILE "ldct2")
(SET_BLOCK2) ;GOTO SET BLOCK 2
) ;_ end of if
) ;end INSERT_BLOCK_VIEW
;-----------------------------------------------------------------------;
(defun
SET_BLOCK ()
(setq
D (nth 1 SIZE_DIMS)
) ;end setq
) ;End SET_BLOCK
(defun
SET_BLOCK2 ()
(setq
D (nth 1 SIZE_DIMS)
) ;end setq
(INSERT_BLOCK2) ;GOTO INSERT BLOCK 2
) ;End SET_BLOCK2
;-----------------------------------------------------------------------;
(defun
INSERT_BLOCK1 ()
(command
"._-insert" "nut_ac" pause 1 1 0
) ;_ end of command
) ;end INSERT_BLOCK1
(defun
INSERT_BLOCK2 ()
(command
"._-insert" "D" pause 1 1 0
) ;_ end of command
) ;end INSERT_BLOCK2
***MENUGROUP= ZZZZ
***POP20
**CADLIB
[LIBRARY]
[->Stddwgs]
[TRENCH]$I= ZZZZ.TRENCH $I=*
[PIPES]$I= ZZZZ.PIPES $I=*
[PITS]$I= ZZZZ.PITS $I=*
[KERBS]$I= ZZZZ.KERBS $I=*
[SHEETS]$I= ZZZZ.SURVEY $I=*
***image
**SURVEY
[SURVEY]
[A0,A0]^C^C^P(SETQ FNAME "A0")(LOAD "NEWSURVLAYOUT")
[A1,A1]^C^C^P(SETQ FNAME "A1")(LOAD "NEWSURVLAYOUT")
[A3 Srv 1,A3 Srv 1]^C^C^P(SETQ FNAME "A3 Survey Sheet 1")(LOAD "NEWSURVLAYOUT")
[A3 Srv 2,A3 Srv 2]^C^C^P(SETQ FNAME "A3 Survey Sheet 2")(LOAD "NEWSURVLAYOUT")
[A3 ex 1,A3 ex 1]^C^C^P(SETQ FNAME "A3 Survey Sheet ex 1)(LOAD "NEWSURVLAYOUT")
Morning All,
I'm getting the impression that I am no longer welcome here?
Support has dried up, have I done something wrong? no one has said.
Am I too much of a novice? :uglystupid2:
For anyone following this thread, my inspiration came from 'wisey steel shapes' (as mentioned).
This utility can be found here:
https://blog.draftsperson.net/wiseys-steel-shapes-lisp-program/ (https://blog.draftsperson.net/wiseys-steel-shapes-lisp-program/)
My contribution, though small, can be found at the bottom of the page.
stay safe everyone.
SteveN
drawing "D" cannot be found!
(defun
INSERT_BLOCK2 ()
(princ D) ; print the content of D variable to the command line.
(command
"._-insert" D pause 1 1 0 ;INSERT BLOCK 2
) ;_ end of command
(defun
SET_BLOCK ()
(setq
D (nth 1 SIZE_DIMS)
) ;end setq
(INSERT_BLOCK2) ;GOTO INSERT BLOCK2
) ;End SET_BLOCK
;-----------------------------------------------------------------------;
;-----------------------------------------------------------------------;
;-----------------------------------------------------------------------;
;-----------------------------------------------------------------------;
;-----------------------------------------------------------------------;
(defun
INSERT_BLOCK1 ()
(command
"._-insert" "RT" pause 1 1 0 ;INSERT BLOCK 1
) ;_ end of command
) ;end INSERT_BLOCK1
(defun
INSERT_BLOCK2 ()
(princ D) ; print the content of D variable to the command line.
(command
"._-insert" D pause 1 1 0 ;INSERT BLOCK2
) ;_ end of command
) ;end INSERT_BLOCK2