Page 1 of 1

Macro Sequence Question - Move Z, to Layer

PostPosted: Fri Aug 16, 2013 12:58 pm
by jimgoodman
I have one for the alias/toolbar gurus out there.

Most survey files we receive have the spot elevations, contours, and survey points at the actual z height. This is the first step in creating a site model, using any of the several tools available in DataCAD. Occasionally, the survey file will come in "flat" or without the correct z heights.

I am trying to automate the process of changing a series of spot elevation points to the actual z height.
In order to keep track of which points have been processed, I create a layer named "3d Spot Elevations" and turn it off.

The steps I am taking are:

1 2d Edit Menu - Move (F1)
2 Move Z (S3)
3 Enter new z height.
4. Return (to accept new height)
4 To Layer (S1)
5 Select 3d Spot Elevations
6. Select the entity, point, etc.

The processed entity will be on the new layer but not displayed so I know which items have been processed.

I am trying to write an alias that will automate the first 4 steps above, but I need the routine to pause while the z height is entered.

^;^F1^F3^$^S1^

Thanks in advance for any assistance on this.

Re: Macro Sequence Question - Move Z, to Layer

PostPosted: Fri Aug 16, 2013 1:29 pm
by Roger D
Extended Code
0170 ª Pause/Prompt
Will do it I Think


From a Dave G post
You can use the PAUSE character (Alt) + (0170) "ª" when defining a keyboard macro string. Inserting this character after a carat "^ª" causes the macro sequence to halt until you click or type. If the pause character is followed by text (i.e., "^ªThis is a comment"), the text will be displayed in DataCAD as a prompt. You may not use the dollar sign ($) character in comment strings.

Re: Macro Sequence Question - Move Z, to Layer

PostPosted: Fri Aug 16, 2013 4:04 pm
by jimgoodman
That was what I was looking for.

^;^F1^F3^ªEnter Z Height^$^S1^ works like a charm

Thanks Roger

Re: Macro Sequence Question - Move Z, to Layer

PostPosted: Fri Aug 16, 2013 4:47 pm
by jimgoodman
Now that I have this working, it would be great if the macro would cycle through form one entity to the next.
Once the initial sequence is complete S0 exit is issued, S3 Move Z is highlighted. It can be selected two times to get back to a new z height.
^;^F1^F3^ªEnter Z Height^$^S1^

If the target layer is in position F2, the following sequence can be added to get to the next entity.
^F2^F1^ªSelect Entity^S0^S3^S3^

Is there a command that will cause this last sequence of the code to repeat over and over again?

Re: Macro Sequence Question - Move Z, to Layer

PostPosted: Fri Aug 16, 2013 6:28 pm
by Roger D
I think there is, I once did it by calling another alias which was just a call back to the one that was running.
I'll have to dissect my alias's again.
Unless Dave G is awake, I think he told me how to do it.

Re: Macro Sequence Question - Move Z, to Layer

PostPosted: Sat Aug 17, 2013 9:50 am
by jimgoodman
This seems like a perfect diversion for David on a summer Saturday morning. :wink:

Re: Macro Sequence Question - Move Z, to Layer

PostPosted: Sat Aug 17, 2013 11:02 am
by Roger D
Or just look in the Reference Manaul, p45

You can use the PAUSE character (Alt) + (0170) "ª" when defining a keyboard macro string. Inserting this character after a carat "^ª" causes the macro sequence to halt until you click or type. If the pause character is followed by text (i.e., "^ªThis is a comment"), the text will be displayed in DataCAD as a prompt. You may not use the dollar sign ($) character in comment strings.

You can call a command line alias from a keyboard, toolbar, or command line alias macro sequence, allowing you to chain together existing aliases by name. To call a command line alias by name, precede the command name with the special character (Alt) + (0169) "©". For example, (B^;^F7^ªSelect entity to erase^©cp) calls the "cp" alias after going to the Erase menu and waiting for one input


I knew somehow it was the © character, but could not find the documentation until back at the keyboard today.
You might have to have it call a dummy alias that then calls your original alias.

ps. I've requested that the online Extended Command List be updated with this info.

Re: Macro Sequence Question - Move Z, to Layer

PostPosted: Sat Aug 17, 2013 1:26 pm
by jimgoodman
Thanks for chasing this down Roger.
I will experiment a bit when I get some free time.