BlockView: Problem displaying block after dwg.

Started by roy_043, October 24, 2013, 05:31:49 AM

Previous topic - Next topic

roy_043

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.

Fred Tomke

Hi, have you tried to clear the blockview first before loading a block?
I believe that I did so in the past.
Regards, Fred
Fred Tomke
Dipl.-Ing. (FH) Landespflege

[ landscaper - landscape developer - digital landscape and urban design]

roy_043

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.

owenwengerd

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.
Owen Wengerd (Outside The Box) / ManuSoft

roy_043