News:

The purpose of these forums is to discuss TurboCAD.  Please keep the discussion of other products to compatibility issues or how the other software can be used with TurboCAD.

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 recorder and constraints crash TC

Started by murray dickinson, May 24, 2017, 04:08:57 PM

Previous topic - Next topic

0 Members and 0 Guests are viewing this topic.

murray dickinson

I set up a simple constrained linkage, notionally a crankshaft throw and a connecting rod as per the picture, tab through and enter 10° in the delta Z rotation box of the inspector bar, the throw rotates and the conrod follows as they should, once or repeatedly.  Recording the tab and entry sequence and replaying them should animate the linkage, but when I've tried with macro recorder, it crashes TC.  Transform tools don't work with constrained entities, so transform recorder isn't a possibility either.    I've tried this in V17 32-bit, V21 and 2015 64-bit with that outcome.    Put an angular variable between crank throw and cylinder centre line and the angle dimension will drive the linkage.  They can also be set between  connecting rod and centre line, or conrod and crank throw, but they have angular limits that overconstrain the linkage, only crank throw and cylinder c/l have 0-360° range.  Making a variable dynamic would animate the linkage.  Does anyone know if that's possible?  If so, how to?  Can a time-based formula be used? 

Henry Hubich

Looks like a job for Animation Lab. I moved the Reference Point of the crank pin to the centerline of the crank, made it an Actor, and applied the Rotate command.

Henry H

murray dickinson

I moved the ref to the axis for macro recording too.  That's a major fail for the recorder, it shouldn't require AniLab purchase to do that.  Thanks for the observation, Henry.

Andy H

Quote from: murray dickinson on May 24, 2017, 04:08:57 PM
Does anyone know if that's possible?  If so, how to?  Can a time-based formula be used?

I'm 60% sure it can, but its 02:35 in the UK and I'm getting a bit tired, just commenting about the crashes, I just did a quick test recording a macro and changing the crank angle to 110 in the calculator palette, stopped macro, reset to 100 and ran macro without error. BUT I didn't use the delta rotate fields as it didn't work at all on my computer (they rotated the ref point but left the line where it was) so I used the calc palette instead..

to adjust the macro for an animation should just be a matter of adding a for - next loop in the correct place (in theory).

One thing about your drawing, it looks like you have a vertical constraint and a fixed geometry constraint on the same line - if this is the case its a no-no, it causes over-constraint problems, and whilst it shouldn't crash it can break the constraints.

murray dickinson

Without the angular constraint it doesn't seem to over-constrain.  But  you're right, Andy, the fix is unnecessary.

Henry Hubich

Quote from: Andy H on May 24, 2017, 06:38:06 PM
Quote from: murray dickinson on May 24, 2017, 04:08:57 PM
Does anyone know if that's possible?  If so, how to?  Can a time-based formula be used?

I'm 60% sure it can, but its 02:35 in the UK and I'm getting a bit tired, just commenting about the crashes, I just did a quick test recording a macro and changing the crank angle to 110 in the calculator palette, stopped macro, reset to 100 and ran macro without error. BUT I didn't use the delta rotate fields as it didn't work at all on my computer (they rotated the ref point but left the line where it was) so I used the calc palette instead..

to adjust the macro for an animation should just be a matter of adding a for - next loop in the correct place (in theory).

One thing about your drawing, it looks like you have a vertical constraint and a fixed geometry constraint on the same line - if this is the case its a no-no, it causes over-constraint problems, and whilst it shouldn't crash it can break the constraints.

Fix Geometry constraint on the Point and Vertical constraint on the Line is OK.

Henry H

Andy H

Quote from: Henry Hubich on May 24, 2017, 07:18:40 PM
Fix Geometry constraint on the Point and Vertical constraint on the Line is OK.
Henry H

Thanks Henry - I didn't know that.

Dean

#7
Quote from: murray dickinson on May 24, 2017, 04:08:57 PM
I set up a simple constrained linkage, notionally a crankshaft throw and a connecting rod as per the picture, tab through and enter 10° in the delta Z rotation box of the inspector bar, the throw rotates and the conrod follows as they should, once or repeatedly.  Recording the tab and entry sequence and replaying them should animate the linkage, but when I've tried with macro recorder, it crashes TC.  Transform tools don't work with constrained entities, so transform recorder isn't a possibility either.    I've tried this in V17 32-bit, V21 and 2015 64-bit with that outcome.    Put an angular variable between crank throw and cylinder centre line and the angle dimension will drive the linkage.  They can also be set between  connecting rod and centre line, or conrod and crank throw, but they have angular limits that overconstrain the linkage, only crank throw and cylinder c/l have 0-360° range.  Making a variable dynamic would animate the linkage.  Does anyone know if that's possible?  If so, how to?  Can a time-based formula be used?

Works for me,Murray > no crash.

Here's what I did. in 2017
start MR click the arrow in the delta rot z 10 times hit enter. I continued the sequence then stopped MR and played back the script. Typing a value rather than clicking the arrow also works.
Are you working in GDI mode?
That being said,The MR as well as constraints always need to be 'Happy" if they're not,well they will let you know.
"What do I know, I'm still learning".
Lenovo Legion T5  Intel(R) Core(TM) i7-14th Gen 20 cores Nvidia RTX 4070 Super 16GB Windows 11 home TurboCad 2025 with Animation Lab 6.0

murray dickinson

Followed your description with crash the result, Dean.    GDI, yes, reason being that in my installations, when setting constraints in RedSK the lines'n'arcs don't highlight magenta, they just sort of shimmer in monochrome and it's not clear whether the constraint has stuck.   I conclude that it's the way I stick my tongue slightly out to the left with pressure against the top lip, but the help files don't tell me that that's wrong.  How do you hold yours? ;)   

Dean

#9
Murray,
> attached is a gif video recorded in 2017 and screen captures of some settings.
I get the same results in version 21.

I recorded @ 20 degree steps.
"What do I know, I'm still learning".
Lenovo Legion T5  Intel(R) Core(TM) i7-14th Gen 20 cores Nvidia RTX 4070 Super 16GB Windows 11 home TurboCad 2025 with Animation Lab 6.0

Dean

Murray,
try this >
In GDI mode go to > options > desktop > uncheck "open gl hardware acceleration'.

I have noticed that something has changed this year with TC builds 21>2017 and I have no idea "what" or "why"  ;D but by un-checking the open gl I did see improvement with TC concerning advanced lightworks render styles. I know this has nothing to do with your problem so I turned "on' open gl in version 21 and TC crashed when running the macro recorder. I then turned it "off" and TC didn't crash running the MR. > good luck
"What do I know, I'm still learning".
Lenovo Legion T5  Intel(R) Core(TM) i7-14th Gen 20 cores Nvidia RTX 4070 Super 16GB Windows 11 home TurboCad 2025 with Animation Lab 6.0