OpenDCL Forums

OpenDCL => Runtime/AutoLISP => Topic started by: khann on May 26, 2009, 04:41:44 AM

Title: help with BlockList Control !!!
Post by: khann on May 26, 2009, 04:41:44 AM
Hi. Anybody has a sample code of BlockList control for previewing the blocks of External DWG?

Control Browser saying : The block list control displays a list of all blocks defined in the current drawing file or in an external .dwg file.

But it's still out of my fingers.

For previewing blocks must use Blockview control?
Title: Re: help with BlockList Control !!!
Post by: Fred Tomke on May 26, 2009, 07:08:56 AM
No, blocklist displays a list of all blocks defined in the current drawing file or in an external .dwg file as you quoted correctly.

What you need is either a DWGPreview (http://www.opendcl.com/HelpFiles/index.php?page=Reference/Control/DwgPreview.htm) or a DWGList (http://www.opendcl.com/HelpFiles/index.php?page=Reference/Control/DwgList.htm) Control.

Fred

Title: Re: help with BlockList Control !!!
Post by: Fred Tomke on May 26, 2009, 07:13:27 AM
Ok, khann, my fault. I've read your initial message again and now I know that you mean the block previews of the external DWG.

Then you are right with a block list.

Set the style property to 0 in OpenDCL Studio.
At runtime of your dialog you have to load the DWG file using

Code (autolisp) Select
(dcl_BlockList_LoadDwg MyProj_MyForm_MyBlockList strDWGFileName)

After that the blocks should be shown in the list.

Fred
Title: Re: help with BlockList Control !!!
Post by: Fred Tomke on May 26, 2009, 07:50:35 AM
Finally, I attached a sample. Please notice that the block previews must be stored into the external DWG file otherwise it won't work (you see a dummy then).

Fred
Title: Cool !!!
Post by: khann on May 26, 2009, 05:29:14 PM
 :) Wonderful! Thank you very much Fred, you're so kind! 
That's really what I need.