AutoCAD Architecture Customization
Welcome to Autodesk’s AutoCAD Architecture Customization Forums. Share your knowledge, ask questions, and explore popular AutoCAD Architecture Customization topics.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Block thumbnail creation causing crash

17 REPLIES 17
Reply
Message 1 of 18
busseynova
519 Views, 17 Replies

Block thumbnail creation causing crash

I Use AA 2009 for space planning and visualization purposes.

I have a set of blocks with embedded images (desks chairs etc) which I have arranged on a tool palette for quick access. I am currently updating these palettes but I'm getting stopped by a problem theta seems to keep cropping up in 2009. Any function that requires the generation of thumbnail images (insert block, design center) causes the programme to crash, with the following warning:

Unhandled Access Violation Reading 0x0018 Exception at 5d810820h

I created the blocks and palettes originally in 2006, the palettes themselves seem to have worked fine but now I'm stuck for updating them as dragging block icons from the design center into the appropriate palette is the only way I know of creating these. Is there another way of creating block references on a palette that won't cause this crash.

Tom.
17 REPLIES 17
Message 2 of 18
Anonymous
in reply to: busseynova

What's the matter with toolbars? This palette thing is way overrated.

--


_________________________

Bill DeShawn
bdeshawn@nospamsterling.net
http://my.sterling.net/~bdeshawn
Notice: New LISP tool for Landscape
Design and for ATTEXT users.
Measure and Divide with attributes!!


wrote in message news:5977943@discussion.autodesk.com...
I Use AA 2009 for space planning and visualization purposes.

I have a set of blocks with embedded images (desks chairs etc) which I have
arranged on a tool palette for quick access. I am currently updating these
palettes but I'm getting stopped by a problem theta seems to keep cropping
up in 2009. Any function that requires the generation of thumbnail images
(insert block, design center) causes the programme to crash, with the
following warning:

Unhandled Access Violation Reading 0x0018 Exception at 5d810820h

I created the blocks and palettes originally in 2006, the palettes
themselves seem to have worked fine but now I'm stuck for updating them as
dragging block icons from the design center into the appropriate palette is
the only way I know of creating these. Is there another way of creating
block references on a palette that won't cause this crash.

Tom.
Message 3 of 18
Anonymous
in reply to: busseynova

On Mon, 14 Jul 2008 04:07:01 +0000, Bill DeShawn
wrote:

>What's the matter with toolbars? This palette thing is way overrated.

...And how, exactly, is one going to create a toolbar button that will insert a
block from a specified external file, and allow all of the flexibility that a
proper Tool would do (including scale, rotation angle, layer, and Dynamic Block
properties), without a BOATLOAD of custom programming?

Matt
mstachoni@verizon.net
mstachoni@bhhtait.com
Message 4 of 18
busseynova
in reply to: busseynova

I agree! I don't understand how I could achieve what I have in the past the use of toolbars. I have a large library of items that I use on a regular basis, so the pallettes came in very useful for organizing and accessing.

Tom.
Message 5 of 18
Anonymous
in reply to: busseynova

Piece of cake! A boatload is all a matter of one's perspective. Probably
just a few lines of AutoLISP.

--


_________________________

Bill DeShawn
bdeshawn@nospamsterling.net
http://my.sterling.net/~bdeshawn
Notice: New LISP tool for Landscape
Design and for ATTEXT users.
Measure and Divide with attributes!!


without a BOATLOAD of custom programming?

Matt
mstachoni@verizon.net
mstachoni@bhhtait.com
Message 6 of 18
Anonymous
in reply to: busseynova

Libraries are a snap. Ever heard of slides? Slide libaries? SLIDELIB.EXE?
Where do you get a better image than a slide? No need to draw an BMP image.
Just take a picture. And it's not something new to learn. It's been around
longer than I have (and man, is THAT a long time.) Nothing complicated
about it. Set it up once, and the next time and every time after that it's
as easy as clicking the remote. 🙂

--


_________________________

Bill DeShawn
bdeshawn@nospamsterling.net
http://my.sterling.net/~bdeshawn
Notice: New LISP tool for Landscape
Design and for ATTEXT users.
Measure and Divide with attributes!!


wrote in message news:5980812@discussion.autodesk.com...
I agree! I don't understand how I could achieve what I have in the past the
use of toolbars. I have a large library of items that I use on a regular
basis, so the pallettes came in very useful for organizing and accessing.

Tom.
Message 7 of 18
Anonymous
in reply to: busseynova

On Wed, 16 Jul 2008 04:54:56 +0000, Bill DeShawn
wrote:

>Piece of cake! A boatload is all a matter of one's perspective. Probably
>just a few lines of AutoLISP.

Ah, well, ok then. Please enlighten us with your "few lines of
AutoLISP."

Matt
mstachoni@verizon.net
mstachoni@bhhtait.com
Message 8 of 18
Anonymous
in reply to: busseynova

I'd be glad to. Even though you aren't the OP. The OP was asking about
insertion of blocks (didn't mention MVBLOCKS) on a specific layer at a
specific scale. In LISP, points are easily either calculated or user can be
allowed to specify the exact point. Scale can be either automatic based on
type of drawing (manufacturing, civil, architectural, etc.) and DIMSCALE, or
sometimes LTSCALE. LTSCALE is preferred to DIMSCALE if doing drafting that
doesn't require dimensioning such as electronic schematics. How are you
using palettes with respect to insertion of blocks?

--


_________________________

Bill DeShawn
bdeshawn@nospamsterling.net
http://my.sterling.net/~bdeshawn
Notice: New LISP tool for Landscape
Design and for ATTEXT users.
Measure and Divide with attributes!!


"Matt Stachoni" wrote in message
news:5982618@discussion.autodesk.com...
On Wed, 16 Jul 2008 04:54:56 +0000, Bill DeShawn

wrote:

>Piece of cake! A boatload is all a matter of one's perspective. Probably
>just a few lines of AutoLISP.

Ah, well, ok then. Please enlighten us with your "few lines of
AutoLISP."

Matt
mstachoni@verizon.net
mstachoni@bhhtait.com
Message 9 of 18
Anonymous
in reply to: busseynova

On Mon, 21 Jul 2008 00:59:18 +0000, Bill DeShawn
wrote:

>I'd be glad to. Even though you aren't the OP. The OP was asking about
>insertion of blocks (didn't mention MVBLOCKS) on a specific layer at a
>specific scale. In LISP, points are easily either calculated or user can be
>allowed to specify the exact point. Scale can be either automatic based on
>type of drawing (manufacturing, civil, architectural, etc.) and DIMSCALE, or
>sometimes LTSCALE. LTSCALE is preferred to DIMSCALE if doing drafting that
>doesn't require dimensioning such as electronic schematics.

I've coded similar block insertion tools using VLISP (and it indeed took a
mountain of code to do so), but migrated my block libraries to Tool Palettes
ages ago, because it's clearly the only sane approach.

> How are you using palettes with respect to insertion of blocks?

Simple: I have organized catalogs of palettes, whose tools access a central set
of resource drawings on the server. Each resource drawing stores many blocks of
a similar nature; some drawings store hundreds. Tools and palettes are linked to
the workspace, so changes to the server copy can be replicated on the
workstation.

When I asked how you would code into toolbars the functional parallel of Tools
using VLisp, and you replied that it was a "piece of cake," I suspect you are
either lying, do not fully understand the requirements laid down, or are simply
delusional.

To point, your statement above fails to mention some of the most important
advantages of using Tools over a custom code approach using toolbars:

It's effortless (by ANYONE, not just a Vlisp code monkey) to create one or more
tools which inserts blocks from external reference files. It's drag and drop,
for crying out loud. Done and done. And with Design Center you can create an
entire palette of tools - complete with graphical icons - which inserts ALL of
the blocks in a particular drawing.

Tools already understand Dynamic Block parameters and provide an interface for
pre-setting them in the tool itself. While you can access DB properties using
VLisp (and no, it's not a "piece of cake") and create a routine to insert that
block with those properties preset, it's simply RIDICULOUS to try to do so given
that Tools provide this all wrapped up without any coding at all.

A VLISP approach to do this requires at least an in-depth knowledge of the
mechanics of the AutoCAD Object Model using COM (specifically, the
GetInterfaceObject method) to access a remote DWG file, open it, read the blocks
collection, get the block object you are interested in, read its Dynamic Block
properties, copy the block definition into the current drawing, set the DB
properties, and finally insert the block into the drawing.

And that's just for starters. You have to provide for all of the other
properties that need to be set in the toolbar button: Check to make sure the
layer is present (create it if not), the linetype is present (load it if not),
Plot Style, DIMSCALE, and so on.

But then you, as the programmer, have to provide an interface for allowing users
to create toolbar buttons which do the same thing as a simple Tool would do. The
Tool System allow anyone to create such tools almost without thinking. But for
you or a poor user to do the parallel operation in a Toolbar button means
you/they have to:

A. Open the CUI editor;
B. Create a toolbar or select one to edit;
C. Create a new command;
D. Understand what the block's Dynamic Block properties are;
E. Understand how to call the function, i.e. write this in the 'Macro' line:

^c^c^p(InsertBlock "BlockName" "FileName" "sLayer" rScale rRotAngle bExplode
bRotPrompt iColor sLineType sPlotStyle sLineWeight DBProp1 DBProp2...)

F. Create a new Toolbar Button, and assign the insertion macro to that button;
G. Create a custom icon for that command;
H. Close the CUI editor and pray the change actually takes hold
I. Repeat this for each and every block they want access to.

Yeah, right.

Furthermore, automatically creating toolbar buttons for each and every block in
the remote file is impossible given the limitations of VLisp. All toolbar
buttons would have to be carefully crafted by hand.

Additionally, toolbar buttons are only 16x16 pixels square, while tools use
images which are 32x32, which give you a much greater level of detail. Plus, you
can dynamically resize one or more tool palette icons on the fly.

Matt
mstachoni@verizon.net
mstachoni@bhhtait.com
Message 10 of 18
Anonymous
in reply to: busseynova

Perhaps you have a point about the ease of palettes. But when I first tried
to use them, they didn't understand the macro the way the toolbar did.
After playing around with them, I decided that for my own use, my preference
would be toolbars and slide menus. I've set it up so that it doesn't take
long at all for me to create a slide, add it to a slide library, add the
info in CUI and send the CUI around to all the users on the network.
Admittedly, CUI is slower than MNS. But it's not so slow just yet that I
would abandon it or prefer to use something that doesn't interpret macros
like menus.

--


_________________________

Bill DeShawn
bdeshawn@nospamsterling.net
http://my.sterling.net/~bdeshawn
Notice: New LISP tool for Landscape
Design and for ATTEXT users.
Measure and Divide with attributes!!


"Matt Stachoni" wrote in message
news:5986276@discussion.autodesk.com...
On Mon, 21 Jul 2008 00:59:18 +0000, Bill DeShawn

wrote:

>I'd be glad to. Even though you aren't the OP. The OP was asking about
>insertion of blocks (didn't mention MVBLOCKS) on a specific layer at a
>specific scale. In LISP, points are easily either calculated or user can
>be
>allowed to specify the exact point. Scale can be either automatic based on
>type of drawing (manufacturing, civil, architectural, etc.) and DIMSCALE,
>or
>sometimes LTSCALE. LTSCALE is preferred to DIMSCALE if doing drafting that
>doesn't require dimensioning such as electronic schematics.

I've coded similar block insertion tools using VLISP (and it indeed took a
mountain of code to do so), but migrated my block libraries to Tool Palettes
ages ago, because it's clearly the only sane approach.

> How are you using palettes with respect to insertion of blocks?

Simple: I have organized catalogs of palettes, whose tools access a central
set
of resource drawings on the server. Each resource drawing stores many blocks
of
a similar nature; some drawings store hundreds. Tools and palettes are
linked to
the workspace, so changes to the server copy can be replicated on the
workstation.

When I asked how you would code into toolbars the functional parallel of
Tools
using VLisp, and you replied that it was a "piece of cake," I suspect you
are
either lying, do not fully understand the requirements laid down, or are
simply
delusional.

To point, your statement above fails to mention some of the most important
advantages of using Tools over a custom code approach using toolbars:

It's effortless (by ANYONE, not just a Vlisp code monkey) to create one or
more
tools which inserts blocks from external reference files. It's drag and
drop,
for crying out loud. Done and done. And with Design Center you can create an
entire palette of tools - complete with graphical icons - which inserts ALL
of
the blocks in a particular drawing.

Tools already understand Dynamic Block parameters and provide an interface
for
pre-setting them in the tool itself. While you can access DB properties
using
VLisp (and no, it's not a "piece of cake") and create a routine to insert
that
block with those properties preset, it's simply RIDICULOUS to try to do so
given
that Tools provide this all wrapped up without any coding at all.

A VLISP approach to do this requires at least an in-depth knowledge of the
mechanics of the AutoCAD Object Model using COM (specifically, the
GetInterfaceObject method) to access a remote DWG file, open it, read the
blocks
collection, get the block object you are interested in, read its Dynamic
Block
properties, copy the block definition into the current drawing, set the DB
properties, and finally insert the block into the drawing.

And that's just for starters. You have to provide for all of the other
properties that need to be set in the toolbar button: Check to make sure the
layer is present (create it if not), the linetype is present (load it if
not),
Plot Style, DIMSCALE, and so on.

But then you, as the programmer, have to provide an interface for allowing
users
to create toolbar buttons which do the same thing as a simple Tool would do.
The
Tool System allow anyone to create such tools almost without thinking. But
for
you or a poor user to do the parallel operation in a Toolbar button means
you/they have to:

A. Open the CUI editor;
B. Create a toolbar or select one to edit;
C. Create a new command;
D. Understand what the block's Dynamic Block properties are;
E. Understand how to call the function, i.e. write this in the 'Macro' line:

^c^c^p(InsertBlock "BlockName" "FileName" "sLayer" rScale rRotAngle bExplode
bRotPrompt iColor sLineType sPlotStyle sLineWeight DBProp1 DBProp2...)

F. Create a new Toolbar Button, and assign the insertion macro to that
button;
G. Create a custom icon for that command;
H. Close the CUI editor and pray the change actually takes hold
I. Repeat this for each and every block they want access to.

Yeah, right.

Furthermore, automatically creating toolbar buttons for each and every block
in
the remote file is impossible given the limitations of VLisp. All toolbar
buttons would have to be carefully crafted by hand.

Additionally, toolbar buttons are only 16x16 pixels square, while tools use
images which are 32x32, which give you a much greater level of detail. Plus,
you
can dynamically resize one or more tool palette icons on the fly.

Matt
mstachoni@verizon.net
mstachoni@bhhtait.com
Message 11 of 18
Anonymous
in reply to: busseynova

On Mon, 21 Jul 2008 15:23:01 +0000, Bill DeShawn
wrote:

>Perhaps you have a point about the ease of palettes. But when I first tried
>to use them, they didn't understand the macro the way the toolbar did.
>After playing around with them, I decided that for my own use, my preference
>would be toolbars and slide menus. I've set it up so that it doesn't take
>long at all for me to create a slide, add it to a slide library, add the
>info in CUI and send the CUI around to all the users on the network.
>Admittedly, CUI is slower than MNS. But it's not so slow just yet that I
>would abandon it or prefer to use something that doesn't interpret macros
>like menus.

You can easily create a command tool which works just as well (if not better
than) a macro from a menu. Grab a Command Tool from the Stock Tool Catalog >
Helper Tools, or (better yet) grab the Command Tool with Properties.

Enter the command macro as your VLisp function as usual after the ^c^c.

As far as I'm concerned, the only thing a menu macro/Vlisp function has over a
block tool is the fact that you can specify the insertion point in the Vlisp
macro. If Autodesk would add that to the block insertion Tool type it would be
awesome.

Matt
mstachoni@verizon.net
mstachoni@bhhtait.com
Message 12 of 18
busseynova
in reply to: busseynova

If I can just interupt again at this point;

thanks for all your comments, unfortunately I have a fairly hazy idea of what you're talking about, I'm a basic AutoCAD user - just for space planning and vizualisation, I have no knowledge of Autolisp or other programming types so I think I'd struggle using the method you've mentioned Bill.

My point was - I've created toolbars before - with the very simple method you mentioned Matt, of dragging and dropping icon from the design centre. This was easy enough for even me to use, and gave me the functionality I required - rotation and placement of objects (I rarely require scale). However now I've switched to 2009, any function that requires block thumbnails - insert/design centre tends to cause a crash. I fail to see how such a simple task should throw up such a horendous error just especially when these elements of the interfae don't seem to have changed at all from previous versions. I guess I might just have to back date my drawings and recreate the tool pallettes in 2006 (which I kept on my drive for exactly these circumstanes) then hope and pray that they will transfer back across to 2009.

Tom.
Message 13 of 18
Anonymous
in reply to: busseynova

It was something similar to the comment below that I was having a problem.
A menu macro wouldn't necessarily require LISP, but can be written so that
the user can pick an insertion point and then allow the user to rotate the
block before the macro would finish. Is this the trouble you incur with
palette command functions?

--


_________________________

Bill DeShawn
bdeshawn@nospamsterling.net
http://my.sterling.net/~bdeshawn
Notice: New LISP tool for Landscape
Design and for ATTEXT users.
Measure and Divide with attributes!!

As far as I'm concerned, the only thing a menu macro/Vlisp function has over
a
block tool is the fact that you can specify the insertion point in the Vlisp
macro. If Autodesk would add that to the block insertion Tool type it would
be
awesome.
Message 14 of 18
Anonymous
in reply to: busseynova

On Tue, 22 Jul 2008 15:21:43 +0000, Bill DeShawn
wrote:

>It was something similar to the comment below that I was having a problem.
>A menu macro wouldn't necessarily require LISP, but can be written so that
>the user can pick an insertion point and then allow the user to rotate the
>block before the macro would finish. Is this the trouble you incur with
>palette command functions?

No, creating a simple menu macro to insert a block is easy. From the perspective
of Tools, the properties available for a block insertion tool does not include a
predefined IP, which is what re I would like to see, e.g. for blocks that
require a standard 0,0,0 IP, such as a title block and additional sheet data.

Matt
mstachoni@verizon.net
mstachoni@bhhtait.com
Message 15 of 18
Anonymous
in reply to: busseynova

OK. Well, the macro you write can put it on 0,0,0 if you want, but I know:
You'd like to see it part of a blocks property set that it could ONLY be
placed upon hard-wired coordinates and not allowed to be moved. I just
don't see that as an advantage in the long run. It's like locking an object
with a password in order to make a change to it. That can get you into a
heap of trouble. Can LISP do that? Well, if I use my imagination, I guess
a reactor can be assigned to a block so that if it gets moved from 0,0,0,
then it gets put right back again, and might even give the user an AutoCAD
alert: "Moving this object from 0,0,0 is not allowed." But you know,
there's even a way around that. In BEDIT or REFEDIT, a user can move all
the objects in the block without changing its insertion point. The reactor
would just be another exercise in futility. If the title block was XREFed,
it would be a little harder but could still be done in the same way, and if
it was done, it would mess up other drawings that referenced it.



--


_________________________

Bill DeShawn
bdeshawn@nospamsterling.net
http://my.sterling.net/~bdeshawn
Notice: New LISP tool for Landscape
Design and for ATTEXT users.
Measure and Divide with attributes!!


"Matt Stachoni" wrote in message
news:5987774@discussion.autodesk.com...
On Tue, 22 Jul 2008 15:21:43 +0000, Bill DeShawn

wrote:

>It was something similar to the comment below that I was having a problem.
>A menu macro wouldn't necessarily require LISP, but can be written so that
>the user can pick an insertion point and then allow the user to rotate the
>block before the macro would finish. Is this the trouble you incur with
>palette command functions?

No, creating a simple menu macro to insert a block is easy. From the
perspective
of Tools, the properties available for a block insertion tool does not
include a
predefined IP, which is what re I would like to see, e.g. for blocks that
require a standard 0,0,0 IP, such as a title block and additional sheet
data.

Matt
mstachoni@verizon.net
mstachoni@bhhtait.com
Message 16 of 18
Anonymous
in reply to: busseynova

On Wed, 23 Jul 2008 05:19:02 +0000, Bill DeShawn
wrote:

>OK. Well, the macro you write can put it on 0,0,0 if you want, but I know:
>You'd like to see it part of a blocks property set that it could ONLY be
>placed upon hard-wired coordinates and not allowed to be moved.

??

No, I just want the Block Tool to allow me to preset the IP to be 0,0,0 - the
tool plops the block in and that's that. It's one less click of a mouse, and
it's one less thing that users can screw up. That's all.

I'm not interested at all in "locking" the object there. Although, I DO think
Adesk should add a "Locked" property to objects that is independent of layer.

Matt
mstachoni@verizon.net
mstachoni@bhhtait.com
Message 17 of 18
Anonymous
in reply to: busseynova

OK. Check this out. I have a LISP function that inserts a title block at
0,0,0. It wouldn't be an insert command. But you would type in the
NEWTITLE command instead. I currently use it to get a block from a specific
folder, copy it to the DWGPREFIX folder (in other words: the same folder
that the current active drawing resides in), and it asks you for a name.
For subsequent drawings or layouts in the project another command: TITLE
would be used.

I can set it up to either XREF Attach or Insert as a block. Everything you
want would be there. It just would be a different command.



Would that work for you?

--


_________________________

Bill DeShawn
bdeshawn@nospamsterling.net
http://my.sterling.net/~bdeshawn
Notice: New LISP tool for Landscape
Design and for ATTEXT users.
Measure and Divide with attributes!!


"Matt Stachoni" wrote in message
news:5988338@discussion.autodesk.com...
On Wed, 23 Jul 2008 05:19:02 +0000, Bill DeShawn

wrote:

>OK. Well, the macro you write can put it on 0,0,0 if you want, but I know:
>You'd like to see it part of a blocks property set that it could ONLY be
>placed upon hard-wired coordinates and not allowed to be moved.

??

No, I just want the Block Tool to allow me to preset the IP to be 0,0,0 -
the
tool plops the block in and that's that. It's one less click of a mouse, and
it's one less thing that users can screw up. That's all.

I'm not interested at all in "locking" the object there. Although, I DO
think
Adesk should add a "Locked" property to objects that is independent of
layer.

Matt
mstachoni@verizon.net
mstachoni@bhhtait.com
Message 18 of 18
Anonymous
in reply to: busseynova

On Thu, 24 Jul 2008 03:51:49 +0000, Bill DeShawn
wrote:

>OK. Check this out. I have a LISP function that inserts a title block at
>0,0,0. .. Would that work for you?

Like I said, I already have several similar routines for importing library
blocks (either as complete files, e.g. details, or a block within a file). And
yes, they can automatically insert the block at 0,0,0.

Just wish I could get a built-in Block Tool to do the same thing, without having
to create a Command Tool which simply calls the custom functon.

Thanks anyway.

Matt
mstachoni@verizon.net
mstachoni@bhhtait.com

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report

”Boost