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

QuickCalc Variables

24 REPLIES 24
Reply
Message 1 of 25
radiohaktive
1287 Views, 24 Replies

QuickCalc Variables

Okay, I have a few dozen variables that I am trying to store for use at the command line. I can only append to input area with the actual quickcalc open, anyone know how i can reinitialize the global variable list? 

24 REPLIES 24
Message 2 of 25
pendean
in reply to: radiohaktive

What does that mean please?
Message 3 of 25
radiohaktive
in reply to: radiohaktive

Well, from the command line, you can call forth the command line version of the calculator using 'cal right after a command has been started. AutoCAD has built in variables such as "mee" which, as an expression, is equal to [(end+end)/2];. I have expressions which are quite lengthy, such as [(xof(nea+nea)/2+yof(nea))]; and I would like to create a variable like "mee" that I can call forth right from the command line. Say I wanted to call it "xnny", I can do that in CAD's GUI for the calculator, but it doesn't seem to stick when I try to call it from the command line after 'cal. 

I know the command line calculator is dead, but I mean what's the point of technical design if you're not getting techincal. 

 

Any help would be greatly appreciated. Thanks. 

Message 4 of 25
steven-g
in reply to: radiohaktive

You can use a few variables for storing values, these are the USERI and USERR numbers 1 to 5, you can refer to them with the getvar command, you can also use getvar to read any of the system variables whilst using the cal command.

Message 5 of 25
pendean
in reply to: radiohaktive

LT will let you create environment variables that are stores in the WIndows Registry too: SETENV to set one up, GETENV to call it. Pretty much unlimited in use and naming conventions, but you should work out a system to remember as there is no need to have thousands of these.

Try it.
Message 6 of 25
steven-g
in reply to: pendean

unfortunately the environmental variables are not accesible from inside the 'cal environment, but could be very useful if they are used within a macro.

Message 7 of 25
radiohaktive
in reply to: radiohaktive

NO NO NO, global variables. I am posting this because I have already tried everything mentioned. I'm a CAD Manager for cryin out loud lol. What I am looking to set are global variables (as mentioned in the FIRST post); maybe LT doesn't allow you to do it since LT doesn't support LISP. See the attached picture; you can use the 'Sample variables' from the command line. I would like to get my custom variables, i.e. 'mxxy' to operate the same way the 'Sample variables' do. 

 

(yes, i know you're wondering how I could be a CAD manager and use LT. It's not my company and i cant get them to upgrade)

 

Message 8 of 25
steven-g
in reply to: radiohaktive

Ah ha why didn't you say that in the first place. A picture is worth a thousand words as they say, unfortunately I didn't even realise that part of the calculator existed.

 

Message 9 of 25
steven-g
in reply to: steven-g

Am I being dense here (don't even think about answering that), what exactly did you mean by saying reinitialising the list, because from a later post I now read that, as actually creating a custom value and not being able to use that value later from within the 'cal command. And I just did that, well a very simple named constant.

Message 10 of 25
pendean
in reply to: radiohaktive

How do you enter the global variable now, at the commandline?

In the palette window?
The former is your LT customization answer.

Message 11 of 25
pendean
in reply to: steven-g

Agreed, my test seems to stick between LT sessions as well.
Message 12 of 25
radiohaktive
in reply to: steven-g

I discovered it totally random only a couple months ago, so I'm still learning but it's extremely useful. It's really useful for electrical and mechanical layouts since they are generally more representative than literal. If you're working with another consultant's file and the snaps are all messed up, it can be difficult to align a supply grille over a window and offset it 6" or so. You can write a quick ((end+end)/2+[6,0]), place it in the right click menu and fly as your laying out those registers. Only problem with that is not all draftsmen have the same right click setup so I need to be able to set these to the command line so we can all use the same expressions. 

Message 13 of 25
radiohaktive
in reply to: pendean

The sample variables, I am able to enter into the command line as you see them spelled out in the palette. I posted pics to show an example of what I am trying to do. I'm new to discussion boards, guess I should have started with the pics. Basically, you will see that I started my line command, fired up the command line calculator, entered the entire expression, and continued with the line command. I want the expression (xof(nea+nea)/2+yof(nea)) to be a neat 3 or 4 letter variable similar to what was seen in the last pic of the quickcalc palette. I have dozens more, but that one is pretty easy to follow. 

Message 14 of 25
radiohaktive
in reply to: steven-g

The constant is a fixed point in the coordinate system. It needs to vary. Man what a doozy, the command line calculator really is dead. 

Message 15 of 25
steven-g
in reply to: radiohaktive

It all sounds perfectly reasonable, and it would appear logical that these variables should be able to be transfered or exported, and shared between computers like you can with tool palettes. I have done a search of the registry but they don't show up there.

Message 16 of 25
pendean
in reply to: radiohaktive

Let's start again.

1. Customizing in LT is simple: whatever you can type at the commandline you can automate as a macro in the CUI.

2. Can you do ALL that you want and need at the commandline? If yes, you have the makings of a sharable macro (or a dozen) with other users. If no, it's not an option in LT to automate since QUICKCALC offers no export/import option. Maybe it writes to a file somewhere, not sure yet. up for testing on your end?

I suspect the answer to Q2 is no: welcome to LT's limitations.
If the answer is yes however, then I'm not sure why we are still talking about it 🙂

Your turn: pick one and let us know how to help you write 'dozens' of macros if needed.
Message 17 of 25
steven-g
in reply to: pendean

Good call, it works for me, and to be honest is probably an even quicker method because you can combine it with the line command and go straight into picking points. And the answer to Q2 is yes, I can create a macro that starts a line using the 'cal sequence from post 13.

Message 18 of 25
radiohaktive
in reply to: radiohaktive

This isn't about calling macros from the command line. AutoCAD has shortened names for built-in expressions, such as 'mee'. I want to take the macro expressions we have and give them shortened names too so that I can run those expressions right from the command line calculator. If I want a line between two points, I can type " LINE;'cal;mee; " and CAD will ask me to select two endpoints whose [x,y] values are passed to the expression, divided in half, and the LINE command resumes from the output of the calculation. This is what I am trying to do. Right now we have them in shortcut menus and toolbars, but everyone has a different style for how they want stuff laid out. Command line shortcuts would be way easier.

 

Is what I've been saying this whole time clearer now?  

Message 19 of 25
pendean
in reply to: radiohaktive

mee and others are built into the program by Autodesk. You cannot add to or delete from that list from what any of us end users (like you) can decipher so far.

So... if you cannot do it in a macro, you cannot share it with others right now.

What else would you like to know, without asking the same question yet again 🙂

>>>.. everyone has a different style for how they want stuff laid out...<<<
Company Standards may be worth implementing. Your call with your folks.
Message 20 of 25
radiohaktive
in reply to: pendean

Blast, I thought for sure you could since you can add your own in the calculator palette. Oh well, I guess that just about does it for me then. I'll have to get my company to switch to the full version (ya right). 

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

Post to forums  

Autodesk Design & Make Report

”Boost