News:

Interested in some really terrific mobile apps? Visit www.turboapps.com for details.

Main Menu
TurboCAD 2026 Platinum box
Now available

TurboCAD 2026.2

The latest update for TurboCAD 2026. It installs over any 2026 build and keeps your activation, drawings and settings. Get it from the Start Page or Help > Check for Update.

Macro programming

Started by AussieBloke, October 22, 2017, 04:11:56 PM

Previous topic - Next topic

0 Members and 0 Guests are viewing this topic.

AussieBloke

Didnt know where to post the request, moderator please move if needed.

Can we program a wait command or pause inside the macro programming?

Just want to use a macro to playback some commands then wait ( time interval ) then continue, is that possible?

Daz

Andy H

Hi Daz,  Hmm, interesting - personally I've no idea, the VBscript sleep didn't work in a macro, it may be possible to use a variable to get the number of seconds at the present time, and use a loop to wait until seconds = seconds + 10 but I haven't tried it and not really what macro's were designed to do.

I can't help wondering what commands you are entering into the macro palette in order to need a wait, macro's are really for instantly executing a task or repetitive tasks. 

AussieBloke

Andy you hit the nail on the head, the macros are blindingly fast of course and thats dependent on the function at hand. Im using macros to record the objects on screen as I use the walkthrough tools commands. Im just showing the tc screen interface as well as objects in model space as well, otherwise I would have completed this task animation.

Ive tried sleep with no success either but I did try manipulating a temporary object of screen with some sucess.  I used a simple box object and did some boolean operations and other commands to try and achieve a 5 second pause/wait so the viewer would understand the visual aspects. I will try this further.

Thanks
Daz

Andy H

#3
Ok,  just gave it a try using a macro,  and this seems to work OK,  but I'd try it on a copy of the file, in case you system objects to the Do command

Dim x
Dim y
x = Second(now)
y = x + 5

Do Until x = y
  x = Second(now)
  If x > y then Exit Do
Loop

that said, personally I'd use a screen video capture program - but that's just me  :)

AussieBloke

Im using a screen capture program to get some of the model space and certain functional elements from tcw screen inteface. Seems to have worked ok, but Ive had to add the same loop in a few more times into the macro code for the time at which it takes the user to visualise the changes.

Thanks

Daz