2011-12-02 13:09 UTC
In Bricscad I'm having trouble viewing a DWG in the DGWPreview box. When initialising the Form the preview appears, but I'm not able to switch the content.
I have created a smal testproject with the minimum of code, but it still doesn't work.
Am I doing something wrong?
(defun c:btst ( / )
(command "_OPENDCL")
(dcl_Project_Load "btst")
(dcl_Form_Show btst_Form1)
)
(defun c:btst_Form1_OnInitialize (/)
(dcl_ListBox_Clear btst_Form1_ListBox1)
(setq fullpathlist '("e:\\temp\\block1.DWG" "e:\\temp\\block2.DWG" "e:\\temp\\block3.DWG"))
(dcl_ListBox_AddList btst_Form1_ListBox1 fullpathlist)
(dcl_DwgPreview_LoadDwg "btst" "Form1" "DwgPreview1" (nth 1 fullpathlist)) ;this preview will show up
)
(defun c:btst_Form1_ListBox1_OnSelChanged (ItemIndexOrCount Value /)
(dcl_Control_SetCaption btst_Form1_Label1 Value) ; to check the value
(dcl_DwgPreview_LoadDwg "btst" "Form1" "DwgPreview1" Value) ;box will be cleared at this point
)
(princ)
I have created a smal testproject with the minimum of code, but it still doesn't work.
Am I doing something wrong?
(defun c:btst ( / )
(command "_OPENDCL")
(dcl_Project_Load "btst")
(dcl_Form_Show btst_Form1)
)
(defun c:btst_Form1_OnInitialize (/)
(dcl_ListBox_Clear btst_Form1_ListBox1)
(setq fullpathlist '("e:\\temp\\block1.DWG" "e:\\temp\\block2.DWG" "e:\\temp\\block3.DWG"))
(dcl_ListBox_AddList btst_Form1_ListBox1 fullpathlist)
(dcl_DwgPreview_LoadDwg "btst" "Form1" "DwgPreview1" (nth 1 fullpathlist)) ;this preview will show up
)
(defun c:btst_Form1_ListBox1_OnSelChanged (ItemIndexOrCount Value /)
(dcl_Control_SetCaption btst_Form1_Label1 Value) ; to check the value
(dcl_DwgPreview_LoadDwg "btst" "Form1" "DwgPreview1" Value) ;box will be cleared at this point
)
(princ)