Creating a Button Macro with point filters

Creating a Button Macro with point filters

Anonymous
Not applicable
1,391 Views
8 Replies
Message 1 of 9

Creating a Button Macro with point filters

Anonymous
Not applicable

Hi Everyone.

 

I'm trying to create a button macro that will allow me to snap to an entity and use it's Z value as the elevation I want to work at. I'm attempting this since I really don't want to select an entity and click a grip and write down the elevation and then type that in the ELEV prompt. I have written the steps out but I'm a novice in terms of syntax and getting it write in the macro.

 

Here are my steps:

 

1. type elev

2. type .Z

3. digitize point

4. prompted for .XY and digitize point from step 3

5. prompted for second point type .XY

6. type @

7. prompted for Z enter 0

8. enter 0 for thickness

 

This is what I currently have for my macro: ^C^C_elev;.z (the simple part - having difficulty with getting steps 4 to 8 in it)

 

I'm constantly working in a 3D environment and always looking for a way to set my elevation simply by clicking an entity (or anywhere on that entity) and using that points Z value to be my working elevation. I'm using AutoCAD OEM and not using Map or Civil (which I presume would have this function available to it).

 

Any help would be greatly appreciated.

 

Thanks,

Sean

 

0 Likes
Accepted solutions (1)
1,392 Views
8 Replies
Replies (8)
Message 2 of 9

john.vellek
Alumni
Alumni

Hi @Anonymous,

 

I see that you are visiting as a new member to the AutoCAD forum. Welcome to the Autodesk Community!

 

Have you tried using the Action Recorder to record the steps? You can then save the macro with a name and use it as a command in a button or a tool palette command.  Give it a try and see if that works the way you like or need more information.

 

 

Please select the Accept as Solution button if my post solves your issue or answers your question.


John Vellek


Join the Autodesk Customer Council - Interact with developers, provide feedback on current and future software releases, and beta test the latest software!

Autodesk Knowledge Network | Autodesk Account | Product Feedback
0 Likes
Message 3 of 9

Anonymous
Not applicable
Hi John,
I tried that earlier for a different button but it seemed to remember the data that I was using. Can the macro created by the action recorder be modified (I don't just mean the name).
If there is a way to get a macro generated from the action recorder that I can use on any data I will gladly try that option out as well.
Thanks for the advice - I'll try it with this macro.
0 Likes
Message 4 of 9

john.vellek
Alumni
Alumni

Hi @Anonymous,

 

Please try this macro. It should pause for user inputs.  If this works, you can use the FIilterforZ as a command in a button.

 

 

Please select the Accept as Solution button if my post solves your issue or answers your question.


John Vellek


Join the Autodesk Customer Council - Interact with developers, provide feedback on current and future software releases, and beta test the latest software!

Autodesk Knowledge Network | Autodesk Account | Product Feedback
0 Likes
Message 5 of 9

Kent1Cooper
Consultant
Consultant

Could you do it by setting a New UCS with that point as its Origin, rather than with the ELEV command?  [No need to answer the Thickness question that way, at least.]  Since a new Origin is the basic request at the UCS prompt, something like [minimally tested]:

 

^C^CUCS;\;

Kent Cooper, AIA
0 Likes
Message 6 of 9

SEANT61
Advisor
Advisor

Based on the original Command Macro request, give this a try:

^C^C_elev;0,0,0;.xy;@;\;


************************************************************
May your cursor always snap to the location intended.
0 Likes
Message 7 of 9

SEANT61
Advisor
Advisor
Accepted solution

Actually, the original macro request is more accurately met by:

^C^C_elev;0,0,0;.xy;@;\0.0;


************************************************************
May your cursor always snap to the location intended.
0 Likes
Message 8 of 9

Anonymous
Not applicable

SEANT61,

 

thank you for the assistance. this is exactly what i'm looking for.

 

greatly appreciated

 

Sean

0 Likes
Message 9 of 9

SEANT61
Advisor
Advisor
You're welcome.

************************************************************
May your cursor always snap to the location intended.
0 Likes