Visual LISP, AutoLISP and General Customization
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Still stuck .dcl file....

3 REPLIES 3
Reply
Message 1 of 4
rlk
108 Views, 3 Replies

Still stuck .dcl file....

I am attaching the .lsp file and at the bottom of the lisp routine is the .dcl file.
What I need: I need for my selections to show up in the edit boxes...i.e.-when I select a block I need the name to show up in the edit box.
I also need for the dialog box to let me exit to insert a new block, when you see the lsp file you'll know where i am going with that...The file_dia.dcl works fine so far...that's why it is not attached...if you need this file I can send it to you....
Thank for any help....
3 REPLIES 3
Message 2 of 4
BillZ
in reply to: rlk

Where's the Beef?
BillZ
Message 3 of 4
rlk
in reply to: rlk

Ahhhhh.....What a day....
Sorry about that.
Message 4 of 4
Anonymous
in reply to: rlk

Your code is kind of messy, so please excuse me.

Follow this example:

;
; Lisp Skeleton for Dialog: BK
;
(defun C:bk ()
(setq dcl_id (load_dialog "C:\\Cadentity\\test\\bk.dcl"))
(if (not (new_dialog "main1" dcl_id)) (exit))
;
(if Block_name (set_tile "edit1" Block_name))
;

(action_tile "button1" "(setq dcon 1)(done_dialog)")
(action_tile "button0" "(setq dcon 0)(done_dialog)")
;
(start_dialog)
(unload_dialog dcl_id)

(if (= dcon 1)(Get-Block))

(princ)
)
;

(defun Get-Block (/ ent dat typ)

(setq *old-error* *error* *error* *bk-error*)

(setq ent (entsel "\nSelect Block: "))

(if ent
(progn
(setq dat (entget(car ent))
typ (cdr (assoc 0 dat))
)
(if (= typ "INSERT")
(progn
(setq Block_name (cdr (assoc 2 dat)))
; Add anymore information you need here
)
)
)
(setq Block_name nil)
)
(c:bk)
(princ)
)

(defun *bk-error* (msg)

;do what ever you need here
(c:bk)
(princ)
)

;BK.DCL example below

dcl_settings : default_dcl_settings { audit_level = 1 ; }
main1 : dialog {
label = "Hello From Cadentity" ;
: edit_box {
fixed_width = true ;
key = "edit1" ;
width = 30 ;
}
: button {
alignment = centered ;
fixed_width = true ;
key = "button1" ;
label = "Select" ;
width = 14 ;
}
: button {
alignment = centered ;
fixed_width = true ;
is_default = true ;
key = "button0" ;
label = "Exit" ;
width = 14 ;
}
}


--

Rudy@Cadentity.com
Practical Utilities for Productive Solutions
www.Cadentity.com











rlk wrote in message
news:f07f560.1@WebX.maYIadrTaRb...
> Ahhhhh.....What a day....
> Sorry about that.
>

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report

”Boost