OpenDCL Forums

OpenDCL => Runtime/AutoLISP => Topic started by: khann on May 27, 2009, 12:13:23 AM

Title: odd block preview ?
Post by: khann on May 27, 2009, 12:13:23 AM
Hi, I've loaded a file's block to a BlockList control.
Then, some of blocks look the same like odd preview.
How can it be like this?(http://)
-------------------------------------
(d://odd-block-preview.png)
Title: Re: odd block preview ?
Post by: Fred Tomke on May 27, 2009, 10:44:29 PM
Hi khann, as I already mentioned, the blockthumbnail is missing. I will place a question in a forum how to update blockthumbnails.
This may take a while.

Fred
Title: Re: odd block preview ?
Post by: khann on May 28, 2009, 04:54:35 AM
Thanks, Fred.
You're right.
After several tests, I've got it.
Title: Re: odd block preview ?
Post by: Fred Tomke on May 28, 2009, 06:59:46 AM
Hello, khann,

1. to update the blockicons of the current drawing, use the command _BLOCKICON. I still don't know how to do this to other dwg-files which are currently not loaded.

2. There may be still some problems to show blockicons although you've already updated them. Very often these blocks are included in dwg-files wihich were saved by a vertical product (Architecture, Map, Civil). In these cases some AEC-objects may prevent showing the correct icons. Solution: copy the blocks into a new file. Then the blockicons will be updated automatically.

Fred
Title: Re: odd block preview ?
Post by: khann on May 28, 2009, 05:52:39 PM
Thanks, Fred. You came again.
The BLOCKICON command is new to me, I'll try.
Maybe it comes from the AcadMap. I'm working with Map for years.
Title: Re: odd block preview ?
Post by: Fred Tomke on May 28, 2009, 11:48:46 PM
Hi khann,

I was told that this command came into AutoCAD when DesignCenter was born and exists since ca. AutoCAD 2000i. It should be available also in pure AutoCAD, too. Then I remembered that there was this command in Menu File > (Sevices?) > (Update Blockicons?). I set it into () because I use German language, so I don't know the english path. It's the submenu, where _recover and _audit are included in.

@Owen: I hope you find the message here: Would it be possible to include a method to update the blockicons in externally loaded DWG-files for blocklist control?

Here (http://discussion.autodesk.com/forums/message.jspa?messageID=6162458) is an interesting link of this problem.

Fred
Title: Re: odd block preview ?
Post by: owenwengerd on May 29, 2009, 06:47:59 AM
Quote from: Fred Tomke on May 28, 2009, 11:48:46 PM
Would it be possible to include a method to update the blockicons in externally loaded DWG-files for blocklist control?

That would require opening the drawing in the editor, or otherwise displaying and capturing an image for every block in the drawing. I dion't think that is a task that OpenDCL should attempt.
Title: Re: odd block preview ?
Post by: Fred Tomke on May 29, 2009, 11:31:04 AM
QuoteThat would require opening the drawing in the editor

I'm wondering what DesignCenter does, when a blocks collection of a closed dwg will be selected...

Fred
Title: Re: odd block preview ?
Post by: owenwengerd on May 29, 2009, 08:24:14 PM
I'm not sure, but Design Center may not be displaying the block preview icon, but displaying the actual block geometry like a Block View control does. Otherwise, it has to do the same thing that BLOCKICON does, which requires drawing a temporary image on the display, then capturing it.
Title: Re: odd block preview ?
Post by: Fred Tomke on June 02, 2009, 12:27:22 AM
Quote from: owenwengerd on May 29, 2009, 06:47:59 AM
I dion't think that is a task that OpenDCL should attempt.

@Owen: I understand you, but I also agree that the whole power of blocklist control only is visible if no dummy but all the correct previews are shown. I'm not sure where OpenDCL now gets the bitmaps from. I post some code to the admin section, maybe it's interesting for you. Maybe there could be an additional function or a blocklist method to update the blockincons manually... just a thought.

@khann: I was told that drawings saved in a vertical product may prevent pure AutoCAD to show blockicons.

Fred
Title: Re: odd block preview ?
Post by: khann on June 03, 2009, 05:53:42 PM
Hi, Fred.
I think it's not whole problem of BlockList itself.
It's the matter of AutoCADs.

At first, the odd block shape in the BlockList makes me surprise, but when it comes clear I don't care anymore.
However it can be fixed through anyway.