OpenDCL Forums

OpenDCL => Runtime/AutoLISP => Topic started by: roy_043 on October 23, 2011, 12:45:33 PM

Title: DwgPreview update problem in 7.0.0.1
Post by: roy_043 on October 23, 2011, 12:45:33 PM
Bricscad 12.1.2
OpenDCL  7.0.0.1
Win XP

A small problem with DwgPreview:
To load a new dwg in a preview you have to first make it invisible.
See attached files.

Put all files in a single folder.
Open one of the drawings.
Load the lisp.
Enter BKG_BLOCKBROWSER to run.
Hit Reload button.
Result: only BkgBlockBrowser_Main_DwgPreview1 has been updated.

Code (autolisp) Select

(defun c:BkgBlockBrowser_Main_btnReload_OnClicked ()
 ; (dcl_Control_SetVisible BkgBlockBrowser_Main_DwgPreview0 nil) ; required for ODCL 7.0.0.1
 (dcl_DWGPreview_LoadDwg BkgBlockBrowser_Main_DwgPreview0 "A002.dwg")
 (dcl_Control_SetVisible BkgBlockBrowser_Main_DwgPreview0 'T)
 (dcl_Control_SetVisible BkgBlockBrowser_Main_DwgPreview1 nil) ; required for ODCL 7.0.0.1
 (dcl_DWGPreview_LoadDwg BkgBlockBrowser_Main_DwgPreview1 "A003.dwg")
 (dcl_Control_SetVisible BkgBlockBrowser_Main_DwgPreview1 'T)
)

Title: Re: DwgPreview update problem in 7.0.0.1
Post by: owenwengerd on October 23, 2011, 06:56:59 PM
Good catch. This is now fixed for the next build.
Title: Re: DwgPreview update problem in 7.0.0.1
Post by: roy_043 on October 24, 2011, 01:51:53 AM
Thanks Owen.
Title: Re: DwgPreview update problem in 7.0.0.1
Post by: Kerry on December 17, 2011, 10:45:14 PM


Owen,
Any time frame for an update on this.

In the meantime I'm using

Code (autolisp) Select
(defun c:KDUB_BlockInserter_Main_ListBox_OnSelChanged (ItemIndex Value /)
   (dcl_Control_SetVisible KDUB_BlockInserter_Main_DwgPreview1 'T)
   (dcl_Control_SetVisible KDUB_BlockInserter_Main_DwgPreview1 nil)
    (dcl_dwgpreview_loaddwg KDUB_BlockInserter_Main_DwgPreview1
                           (strcat G1003-SelectedFolder "\\" Value)
   )
   (dcl_Control_SetVisible KDUB_BlockInserter_Main_DwgPreview1 'T)     
)


Good workaround roy_043.

Title: Re: DwgPreview update problem in 7.0.0.1
Post by: owenwengerd on December 18, 2011, 03:07:10 AM
I am planning to upload Alpha 2 this weekend.
Title: Re: DwgPreview update problem in 7.0.0.1
Post by: Kerry on December 19, 2011, 12:51:45 AM
Thanks Owen.

I'll be in Santa mode   :D

All the best for the Silly Season.
Be well