2009-10-30 14:57 UTC
Hi,
After having struggled with ACAD dcl for almost a decade, I am just now exploring the brave new world of OpenDCL.
It looks like a great tool, which can do all I ask for and much more.
However, as always when you start something new, there is a bit of confusion, even though I try to move forward in very small and simple steps.
I can see that I must be making some mistakes, but I just cannot figure how to detect them.
Maybe some of you have "been there, done that" so guidance is highly appreciated.
1) Event functions in lsp don't seem to trigger.
The code below does put the form on the screen, but neither the "oninitialize" or the "onclick" functions seem to be called.
(defun C:o7R2 (/ Result)
(command "_OPENDCL") ; Load OpenDCL Runtime
(if (dcl_Project_Load ([shadow=red,left]strcat Logdir "\\Log_Cad"))
(progn
(setq Result (dcl_Form_Show Log_Cad_WDU))
; Note that this code does not execute until *after* the dialog is closed!
;(if (= Result 1) (DoSomething))
)
)
(princ)
)
(defun c:Log_Cad_WDU_OnInitialize (/ sFilename)
(setq sFilename "C:\\Documents and Settings\\ct\\Dokumenter\\My Pictures\\Robert i Muddergrøften Small.jpg")
(if (/= sFileName nil)
(dcl_PictureBox_LoadPictureFile
Log_Cad_WDU_MainPic
sFilename
T
)
)
)
(defun c:Log_Cad_WDU_MainPic_OnClicked (/)
(dcl_MessageBox "To Do: code must be added to event handler\r\nc:Log_Cad_WDU_MainPic_OnClicked" "To do")
)
2) Maybe this applies more to the Studio forum but anyway:
- Can a Form be moved from one project to another?
- Can a project name be changed within an existing project?
Thanks & regards
Carsten
After having struggled with ACAD dcl for almost a decade, I am just now exploring the brave new world of OpenDCL.
It looks like a great tool, which can do all I ask for and much more.
However, as always when you start something new, there is a bit of confusion, even though I try to move forward in very small and simple steps.
I can see that I must be making some mistakes, but I just cannot figure how to detect them.
Maybe some of you have "been there, done that" so guidance is highly appreciated.
1) Event functions in lsp don't seem to trigger.
The code below does put the form on the screen, but neither the "oninitialize" or the "onclick" functions seem to be called.
(defun C:o7R2 (/ Result)
(command "_OPENDCL") ; Load OpenDCL Runtime
(if (dcl_Project_Load ([shadow=red,left]strcat Logdir "\\Log_Cad"))
(progn
(setq Result (dcl_Form_Show Log_Cad_WDU))
; Note that this code does not execute until *after* the dialog is closed!
;(if (= Result 1) (DoSomething))
)
)
(princ)
)
(defun c:Log_Cad_WDU_OnInitialize (/ sFilename)
(setq sFilename "C:\\Documents and Settings\\ct\\Dokumenter\\My Pictures\\Robert i Muddergrøften Small.jpg")
(if (/= sFileName nil)
(dcl_PictureBox_LoadPictureFile
Log_Cad_WDU_MainPic
sFilename
T
)
)
)
(defun c:Log_Cad_WDU_MainPic_OnClicked (/)
(dcl_MessageBox "To Do: code must be added to event handler\r\nc:Log_Cad_WDU_MainPic_OnClicked" "To do")
)
2) Maybe this applies more to the Studio forum but anyway:
- Can a Form be moved from one project to another?
- Can a project name be changed within an existing project?
Thanks & regards
Carsten