Author Topic: Menu Code?  (Read 10041 times)

0 Members and 1 Guest are viewing this topic.

hudster

  • Gator
  • Posts: 2848
Menu Code?
« on: March 13, 2004, 04:48:11 PM »
I am altering a set of custom menus for my company.

These are set up so you set the user scale and it remembers it, and inserts all blocks at the appropriate scale, except that is if you don't specify a scale at all. then it just inserts the block and you are supposed to set the scale, but that's too advanced for some people at my company.

So how do I go about altering this code to alert the operator to specify a scale before insertion?

Code: [Select]
[53(MP001,Isolating Valve)]^C^C$M=$(if,$(=,$(getvar,tilemode),0),_pspace,_r) _attdia 1 _-insert "MP001" _xscale $(if,$(=,$(getvar,tilemode),0),1,$(getvar,userr1)) _yscale $(if,$(=,$(getvar,tilemode),0),1,$(getvar,userr1)) _zscale $(if,$(=,$(getvar,tilemode),0),1,$(getvar,userr1)) \\
Revit BDS 2017, 2016, 2015, 2014, AutoCAD 2017, 2016, Navisworks 2017, 2016, BIM360 Glue

DEVITG

  • Bull Frog
  • Posts: 479
Menu Code?
« Reply #1 on: March 14, 2004, 12:21:00 PM »
why do you scale the drawings? :oops:
Location @ Córdoba Argentina Using ACAD 2019  at Window 10

hudster

  • Gator
  • Posts: 2848
Menu Code?
« Reply #2 on: March 14, 2004, 12:53:40 PM »
we don't, the blocks are 1:1 scale and are inserted at differing scales to suit the drawings being worked on, so we can use 1 set of blocks for multiple drawings.

for example, if it's inserted into a 1:100 drawing we scale it up 100 times, 1:50 - 50 times etc...

Is there a better way of doing this?
Revit BDS 2017, 2016, 2015, 2014, AutoCAD 2017, 2016, Navisworks 2017, 2016, BIM360 Glue

DEVITG

  • Bull Frog
  • Posts: 479
scaling
« Reply #3 on: March 14, 2004, 05:44:10 PM »
As far I know , not scaling is one of the best feature a CAD drawing could have.

Scaling was usefull when we drawn on paper, not a city neither a molecule could be drawn on 1=1 scale  to be seen.
But ACAD  could manage any magnitude between 2^-31 to 2 ^31
or -2,147,483,648 to +2,147,483,647  just in integers.

The fact is to choose the units , if drawing city I would use Km or Mi and if drawing  , architectural , the meter or the feet, if mechanics the mm or inches, and if  molecules a small unit as amstrong.
 



One of the amazing draw I ever seen , not by it's details, was the SOLAR.dwg.

http://www.google.com.ar/search?sourceid=navclient&hl=es&q=solar%2Edwg

I seen it on 2.16 version , the first I had.
There, it can be se the whole solar system , on real 1=1 scale , from the planets orbits to the small plaque on the lunar module left by the apollo mission, in it there where the names of the first "MOONNAUTES".
I'm looking for it , if I find I will post it at the LILLY POND.
Location @ Córdoba Argentina Using ACAD 2019  at Window 10

hudster

  • Gator
  • Posts: 2848
Menu Code?
« Reply #4 on: March 15, 2004, 04:54:42 AM »
The only problem I have with the scale of electrical outlets on a drawing is they are minute if drawing at 1:1 scale, so small that they become illegible.

most things we use are scaled at 1:1, but with small items such as sockets, valves etc that becomes unpractical.
Our lighting, extract grilles, trunking, tray etc are all at 1:1.
Revit BDS 2017, 2016, 2015, 2014, AutoCAD 2017, 2016, Navisworks 2017, 2016, BIM360 Glue

DEVITG

  • Bull Frog
  • Posts: 479
Menu Code?
« Reply #5 on: March 15, 2004, 06:27:06 AM »
Hi Hudster.

Could you scale it previous to insert , only once ?
If so, you will not need to scale it when inserting .
By this way will be easy to handle when in the drawing.
Maybe you can make diferent scale blocks.
Location @ Córdoba Argentina Using ACAD 2019  at Window 10

hudster

  • Gator
  • Posts: 2848
Menu Code?
« Reply #6 on: March 15, 2004, 06:37:50 AM »
the way the menu we have at the moment works, is

1 - Set the drawing scale.
2. insert the blocks you require, depending on the block this is either inserted at 1:1 or scaled to drawing scale.

All i want to do is add a check to the scaled blocks to ensure the drawing scale is set prior to insertion.
Revit BDS 2017, 2016, 2015, 2014, AutoCAD 2017, 2016, Navisworks 2017, 2016, BIM360 Glue

Keith™

  • Villiage Idiot
  • Seagull
  • Posts: 16899
  • Superior Stupidity at its best
Menu Code?
« Reply #7 on: March 15, 2004, 09:34:40 PM »
We developed all of our blocks that when inserted would be scaled 1:1 for the actual block scale. This way the view is correct when plotted. Such things as recepticles and light switches are never drawn to actual lifesize scale anyway and as such we simply use the 1:1 for everything. The only way we ever change a drawing is if we need to use a viewport with the scaling set to the paper size.
Proud provider of opinion and arrogance since November 22, 2003 at 09:35:31 am
CadJockey Militia Field Marshal

Find me on https://parler.com @kblackie

hudster

  • Gator
  • Posts: 2848
Menu Code?
« Reply #8 on: March 16, 2004, 04:04:41 AM »
what we need to do was to keep the block size consistent in the final drawing, so if the drawing was 1:50 and we insert the block at 1:50 scale, it will be the same final size as one inserted at 1:100 in a 1:100 drawing.

I'm not explaining this very well am I?

It's not something I like, but it's what the upper management demanded.
Revit BDS 2017, 2016, 2015, 2014, AutoCAD 2017, 2016, Navisworks 2017, 2016, BIM360 Glue

daron

  • Guest
Menu Code?
« Reply #9 on: March 16, 2004, 07:51:56 AM »
No, it makes sense to me. I think some people would rather just tell you their way of doing things instead of realizing that you may have reasons for doing things your way. As far as setting a scale before hand, I can't think of any variables at the moment, but I'm sure if you look through them, you'll find something. If you don't get an answer later, I'll have a look and see if I can find anything.

DEVITG

  • Bull Frog
  • Posts: 479
maybe it can help
« Reply #10 on: March 16, 2004, 08:46:48 AM »
Using entget you can retrive the block scale , of course after insert it .

Could it help you???

I use this little routine to get the association list which define an entity.

Code: [Select]
; get the entity values for all entity on drawing
(defun c:gety ()
 
  (setq et (entnext))
  (while et
    (princ (entget et))
    (terpri)
    (setq et (entnext et))

  )
)


I insert your block with a 3.14159 scale , just to see where this value is located at the association list

And it show that the x , y , z , scale are at the 41 42 43 .

Quote


((-1 . <Entity name: 40067e88>) (0 . INSERT) (330 . <Entity name: 40067cf8>) (5
. 51) (100 . AcDbEntity) (67 . 0) (410 . Model) (8 . 0) (100 .
AcDbBlockReference) (66 . 1) (2 . P002) (10 0.0 0.0 0.0) (41 . 3.14159) (42 . 3.14159) (43 . 3.14159) (50 . 0.0) (70 . 0) (71 . 0) (44 . 0.0) (45 . 0.0) (210
0.0 0.0 1.0))


Hope it help
Location @ Córdoba Argentina Using ACAD 2019  at Window 10

hudster

  • Gator
  • Posts: 2848
Menu Code?
« Reply #11 on: March 16, 2004, 10:05:35 AM »
That works on my machine, thanks for that.

only problem is it doesn't work on the engineers machines, (they have LT), and that means becasue they can't use it, I can't either.

We need to have a standardisation, so everyone has to have the same menus loaded.

ah well back to the drawing board for that one then.
Revit BDS 2017, 2016, 2015, 2014, AutoCAD 2017, 2016, Navisworks 2017, 2016, BIM360 Glue

Keith™

  • Villiage Idiot
  • Seagull
  • Posts: 16899
  • Superior Stupidity at its best
Menu Code?
« Reply #12 on: March 16, 2004, 09:39:45 PM »
Quote from: Hudster
what we need to do was to keep the block size consistent in the final drawing, so if the drawing was 1:50 and we insert the block at 1:50 scale, it will be the same final size as one inserted at 1:100 in a 1:100 drawing.

I'm not explaining this very well am I?

It's not something I like, but it's what the upper management demanded.

Well, if I am reading this right, it means that you are DRAWING in a scale other than 1:1 .... if this is the case, then I must say that I would strongly recommend you draw 1:1 for everything, then create your layout with viewports to plot the 1:100 or 1:50 ... then the blocks are always in relation to the rest of the drawing....
If I am wrong, then I think you could perhaps use DIESEL for whatever your purpose is.
System variables can be retrieved with $(getvar, variablename) in menus
read up on diesel expressions and you will find that it is quite helpful with menu customization,  AND it works in LT too!!!
Proud provider of opinion and arrogance since November 22, 2003 at 09:35:31 am
CadJockey Militia Field Marshal

Find me on https://parler.com @kblackie

hudster

  • Gator
  • Posts: 2848
Menu Code?
« Reply #13 on: March 17, 2004, 04:37:30 AM »
the floor plans are 1:1, it's the blocks that are scaled.

at 1:1 our socket is 5mm wide, so we scale it up by the drawing scale to ensure it look the same on all drawings.

Items which are sized, i.e 1800mm luminaires are drawn at 1:1 scale and inserted at 1:1
Revit BDS 2017, 2016, 2015, 2014, AutoCAD 2017, 2016, Navisworks 2017, 2016, BIM360 Glue

daron

  • Guest
Menu Code?
« Reply #14 on: March 17, 2004, 08:47:20 AM »
Quote from: Hudster
That works on my machine, thanks for that.

only problem is it doesn't work on the engineers machines, (they have LT), and that means becasue they can't use it, I can't either.

We need to have a standardisation, so everyone has to have the same menus loaded.

ah well back to the drawing board for that one then.


That's like being given a Ferarri and told that you must only drive it as fast as you can pedal a bicycle. You should explain that standardization is great, but should be standardized to suit the software. Surely, they don't expect Word to look like excel or Autocad. There are similarities in the menu structure, but there are differences too. As with Autocad and LT, they may look the same, but take into account that when LT had design center, the full version of autocad didn't. I'm sure there are other pieces of the menu's that you have that the LT guys don't and same goes with them. They're not the same program, but do perform similar tasks.