Jump to content

New Menu : Macro or LISP?


madonthemike

Recommended Posts

Hi ,

 

I been asked to develop a new menu for our office, basically we do electrical work and have a library of symbols that need to be inserted - depending on which icon on the menu is clicked.

 

Our old menu uses macros and cui but most of the time the scaling is off when we get certain drawings (usually with some metric dwgs).

 

Im planning to go the LISP way as it seems more flexible and requires less time, I just have a few questions :

 

The menu I have in mind will have a scale drop down and once the user select a scale a variable will be initailzed with a scaling factor, insertion of symbols will be based on this scaling factor - is there a way i can write this scaling factor variable into the drawing so that the next time I open the drawing the scaling is correct and I can resume adding symbols without setting up again?

 

Any other suggestions on implementing a menu?

Link to comment
Share on other sites

If I were doing this, I'd create a number of templates that had the scaling set in layout, then draw in model at 1:1. Are you doing schematics or component layouts?

Link to comment
Share on other sites

Hi ,

 

I been asked to develop a new menu for our office, basically we do electrical work and have a library of symbols that need to be inserted - depending on which icon on the menu is clicked.

 

Our old menu uses macros and cui but most of the time the scaling is off when we get certain drawings (usually with some metric dwgs).

 

Im planning to go the LISP way as it seems more flexible and requires less time, I just have a few questions :

 

The menu I have in mind will have a scale drop down and once the user select a scale a variable will be initailzed with a scaling factor, insertion of symbols will be based on this scaling factor - is there a way i can write this scaling factor variable into the drawing so that the next time I open the drawing the scaling is correct and I can resume adding symbols without setting up again?

 

Any other suggestions on implementing a menu?

 

At my work we use toolpalletes for symbols, It fairly easy to put some symbols there and they can now be scalede according to annotation scale. Try the 'crtl+3' and see there should come some toolpalletes up to the right side. We store the the symbols in one drawing.

 

May be this will give you a clou:

 

http://cadablog.blogspot.com/2007/11/tool-pallets.html

 

 

You dont need a program experience to set up toolpallets

Link to comment
Share on other sites

...is there a way i can write this scaling factor variable into the drawing so that the next time I open the drawing the scaling is correct and I can resume adding symbols without setting up again?

 

You can use variables useri (useri1÷5)

 

save the value in dwg

[b](setvar "useri1" 100)[/b]

 

 

macro menu

[b]^C^C(command "_-insert" "Goofy" pause (getvar "useri1") "" "")[/b]

 

or

 

[b]^C^C_-insert Goofy \(getvar "useri1");;;[/b]

Edited by SLW210
Use CODE TAGS!!!
Link to comment
Share on other sites

If I were doing this' date=' I'd create a number of templates that had the scaling set in layout, then draw in model at 1:1. Are you doing schematics or component layouts?[/quote']

 

Basically we do work for construction so placing receptacles, lighting fixtures, fire alarm pull stations, conduits and so on...

 

Im not quite sure I understand your method, most of the we follow the architects scale and symbols are scaled according to their scale.

Link to comment
Share on other sites

I have looked into palettes before - the thing is screen real estate is quite important to me and palettes seem to take a big part of it - personally i do not prefer palettes - just a personal thing. How do you control the scale of the blocks you insert with palettes?

Link to comment
Share on other sites

You can use variables useri (useri1÷5)

 

save the value in dwg

[b](setvar "useri1" 100)[/b]

 

 

macro menu

[b]^C^C(command "_-insert" "Goofy" pause (getvar "useri1") "" "")[/b]

 

or

 

[b]^C^C_-insert Goofy \(getvar "useri1");;;[/b]

 

 

This is def. something I can use, i was just reading up :

 

USERI1–5 Stores and retrieves integer values

USERR1–5 Stores and retrieves real numbers

USERS1–5 Stores and retrieves text string data

 

so I guess if I have a scaling factor of say 0.4 I would use urserr?

Edited by SLW210
Link to comment
Share on other sites

I have looked into palettes before - the thing is screen real estate is quite important to me and palettes seem to take a big part of it - personally i do not prefer palettes - just a personal thing. How do you control the scale of the blocks you insert with palettes?

 

Tool palettes need not take up much room. If you have them docked and turn on autohide, all they use is a little strip at the edge, as yo can see below. You can even drag them off onto a second monitor.

 

The first pic is simply my Autocad desktop. The pallets rest in the gray strip at the right side of the screen.

tool pallet 1.jpg

 

When I move the cursor over the pallet area, they pop out. This tool pallet has blocks that I use frequently in curtain wall details. To insert a partition made of 4" metal studs, 5/8 drywall and batt insulation, I simply drag it off the tool pallet into the drawing. The tool pallet disappears and is out of the way till I need it again.

tool pallet 2.jpg

 

Scaling is controlled much the same way inserting a block, since that is essentially what I'm doing here any way. I never scale any thing in model space, drawing everything 1:1 then using a view scale in the layout tabs. If you need the same object scaled differently in model space, you can make an group of pallets for each scale, and set that scale in the properties dialog box.

 

Having frequently used blocks, hatches, even text notes on pallets makes them easy to access and group together.

Link to comment
Share on other sites

I have looked into palettes before - the thing is screen real estate is quite important to me and palettes seem to take a big part of it - personally i do not prefer palettes - just a personal thing. How do you control the scale of the blocks you insert with palettes?
Putting your "personal preference" aside to use Tool Palettes would gain you an immense amount of efficiency. They are highly customizable which is exactly what you're wanting to do, without any coding at all.

 

Do you ever use Properties? Same "real estate" issue if you do but I don't know of anybody who doesn't use Properties at some point. If you get into the habit of using the auto-hide docking feature, or like me, become a Ctrl+3 junkie to open/close the Tool Palettes, then you'll find it's not at all in the way. Or consider other options, like running a dual monitor setup if you're not on a laptop, etc.

Link to comment
Share on other sites

Tool palettes need not take up much room. If you have them docked and turn on autohide' date=' all they use is a little strip at the edge, as yo can see below. You can even drag them off onto a second monitor.

 

The first pic is simply my Autocad desktop. The pallets rest in the gray strip at the right side of the screen.

[ATTACH=CONFIG']33066[/ATTACH]

 

 

 

When I move the cursor over the pallet area, they pop out. This tool pallet has blocks that I use frequently in curtain wall details. To insert a partition made of 4" metal studs, 5/8 drywall and batt insulation, I simply drag it off the tool pallet into the drawing. The tool pallet disappears and is out of the way till I need it again.

[ATTACH=CONFIG]33067[/ATTACH]

 

Scaling is controlled much the same way inserting a block, since that is essentially what I'm doing here any way. I never scale any thing in model space, drawing everything 1:1 then using a view scale in the layout tabs. If you need the same object scaled differently in model space, you can make an group of pallets for each scale, and set that scale in the properties dialog box.

 

Having frequently used blocks, hatches, even text notes on pallets makes them easy to access and group together.

 

Our office has a very similar setup, we do all models space work 1:1 and use varying scales in ps. But we also scale the symbols differently in model space like you mentioned. If i were to implement this using palettes I would need a pallet for each scale that im using, and they would need to be a set of symbols for each scale right? I just want to have one set of symbols and scale it up or down based on a scale selection.

Link to comment
Share on other sites

Shift+Select, right-click all the blocks on your palette and adjust the scale universally on the fly. For a per instance basis, before you seat the block in the drawing type S to scale it. :)

 

*EDIT* OR.... use the CANNOSCALE variable to control the scaling of blocks that are being imported. More front-end work but the end result could be much easier.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...