OpenDCL Forums

OpenDCL => Runtime/AutoLISP => Topic started by: roy_043 on October 24, 2013, 05:31:49 AM

Title: BlockView: Problem displaying block after dwg.
Post by: roy_043 on October 24, 2013, 05:31:49 AM
I notice that after (dcl_BlockView_DisplayDwg) the function (dcl_BlockView_DisplayBlock) has to be called twice for a block to actually display. Is this a known issue or am I doing something wrong?

: ._OPEN
Drawing name: D:/bKG_tmp/20131024B/test_inserted.dwg
:
:
: (LOAD "D:/bKG_tmp/20131024B/DwgBrowser.lsp")C:DWGBROWSER
: DWGBROWSER
: OPENDCL
OpenDCL Runtime [7.0.1.1] loaded
: (dcl_BlockView_DisplayBlock DwgBrowser_Form1_BlockView1 "Square" 0 0.95)     <<<<<< Paste code on command line.
T                                                                              <<<<<< OK.
: (dcl_BlockView_DisplayDwg   DwgBrowser_Form1_BlockView1 "Circ.dwg" 0 0.95)   <<<<<< Paste code on command line.
T                                                                              <<<<<< OK.
: (dcl_BlockView_DisplayBlock DwgBrowser_Form1_BlockView1 "Square" 0 0.95)     <<<<<< Paste code on command line.
nil                                                                            <<<<<< Block does not display.
: (dcl_BlockView_DisplayBlock DwgBrowser_Form1_BlockView1 "Square" 0 0.95)     <<<<<< Paste code on command line.
T                                                                              <<<<<< OK.
Title: Re: BlockView: Problem displaying block after dwg.
Post by: Fred Tomke on October 24, 2013, 01:16:21 PM
Hi, have you tried to clear the blockview first before loading a block?
I believe that I did so in the past.
Regards, Fred
Title: Re: BlockView: Problem displaying block after dwg.
Post by: roy_043 on October 25, 2013, 02:39:16 AM
Thank you Fred for your answer. Your suggestion works.
But there is a bug here:
1.
Clearing the blockview is not required before a dwg is displayed.
2.
When the block does not display in the blockview and you switch to a different application and then back to the cad application, a section of the current modelspace (or layout?) is displayed. The section being shown seems to depend on the visible coordinates of the dwg that was last displayed.
Title: Re: BlockView: Problem displaying block after dwg.
Post by: owenwengerd on October 25, 2013, 11:35:28 AM
Good catch! The problem was due to looking for the block in the previously loaded drawing file rather than the drawing open in the editor. The control should only look in the previously loaded drawing when it was loaded via (dcl_BlockView_PreLoadDwg). This is now fixed for the next build.
Title: Re: BlockView: Problem displaying block after dwg.
Post by: roy_043 on October 27, 2013, 05:09:21 AM
Thank you very much Owen.