Joe_Carrick Posted February 22, 2017 Share Posted February 22, 2017 I would like to enter the <F5> HotKey into a macro so that the Plan would be refreshed. Is there any way to do that? Link to comment Share on other sites More sharing options...
Joe_Carrick Posted February 22, 2017 Author Share Posted February 22, 2017 After thinking about this, I don't think it would work anyway. If the macro isn't executed by a screen refresh, the Hotkey wouldn't be produced, so it's not going to work as I wished. Link to comment Share on other sites More sharing options...
DRAWZILLA Posted February 22, 2017 Share Posted February 22, 2017 Joe are you having to shut down Chief and re-start to refresh the macro's with the new system? I haven't needed to do that. Link to comment Share on other sites More sharing options...
Joe_Carrick Posted February 22, 2017 Author Share Posted February 22, 2017 No, the F5 hotkey will just refresh the view, not the Global Variables Most of my new macros are using a hash so the elements are named (layer name). I'm also using a timer so that the hash is recreated after a few seconds. This ensures that the Global data is current. That happens whenever the screen is refreshed by a Pan/Zoom or F5. Link to comment Share on other sites More sharing options...
GerryT Posted February 22, 2017 Share Posted February 22, 2017 20 minutes ago, Joe_Carrick said: After thinking about this, I don't think it would work anyway. If the macro isn't executed by a screen refresh, the Hotkey wouldn't be produced, so it's not going to work as I wished. Exactly -- But also exactly one of the reasons for asking for the ability to tie macro(s) execution to a icon similar to the "place library feature" or to a custom menu. -- One click -- one execution. This has a couple of benefits: 1. you can control the sequence of execution. 2. The program isn't bogged down with unnecessary executions. 3. per a previous request, if a macro could insert into the keyboard buffer, one could mimic all of the hotkeys and therefore most of Chief's commands. Add in mouse control and number/text input and you have a rudimentary SDK. I doubt that it will ever happen. As to a screen refresh- I found that all that is needed is to wiggle the scroll button to slightly zoom in/out -- All ways works. I expect you know that. I agree that execution of macros which are only tied to labels and/or text is a poor and burdensome scheme but WHOSE LISTENING - not Chief? Link to comment Share on other sites More sharing options...
Joe_Carrick Posted February 22, 2017 Author Share Posted February 22, 2017 Gerry, I've found that I really prefer the F5 Hotkey to using zoom. It's instant and doesn't change the view scale or position. Link to comment Share on other sites More sharing options...
Joe_Carrick Posted February 22, 2017 Author Share Posted February 22, 2017 Simple solution for mouse use: Place the "Refresh Display" icon on a Toolbar. I put it on the Zoom Toolbar Link to comment Share on other sites More sharing options...
glennw Posted February 22, 2017 Share Posted February 22, 2017 This discussion reminds me of the scripting language that Generic CAD had way back when. It basically used the hot keys (or the native command) strung together along with operands to create very powerful scripts including things like user input. eg: ; Separates the commands in a script. Scripts must end with a semi-colon (;) as well. @ Tells Visual CADD to wait for you to type the coordinates of a point or for a click on the drawing screen. @@ Tells Visual CADD to wait for a Pen Up command to finish a continuous tool before moving to the next command. $ Retrieves the current value of the variable it precedes. =;@ Matches the entity you select. UIoff Closes the specified speed bar. UIon Opens the specified speed bar. exename; <path to external application>; run; Tells Visual CADD to run an external application from within Visual CADD. dllname;<dll filename>; dllfunname;<functionname within the dll>;dllrun; Runs a function defined in a .dll file. NOTE: Scripts never contain quotation marks (“). You could do things like this: CS;SX;@;@;CO; Copies objects you first select using a crossing window. MulLineStyle;1;MultiLine; Sets the Style to 1 and starts the MultiLine command. SYMROT;$SYMROT+15; Sets Symbol angle to 15° more than current angle. CS;SB;@;LE;NP; Prompts to select a leader and flips the text of the Leader. TextRot;=;TL;@; Sets text angle to the angle of an object you pick in the drawing and then starts the Text Line command. SetLayer;3;SetColor;12;SetType; 6;SetWidth;1; Sets the properties for layer, color, linetype and linewidth. The next object you draw will take on these properties. Each one of these scripts can then be assigned to it's own shortcut, toolbar or menu item. Link to comment Share on other sites More sharing options...
Recommended Posts
Please sign in to comment
You will be able to leave a comment after signing in
Sign In Now