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