Author Topic: set view by drawing center  (Read 202 times)

rccon

  • Full Member
  • ***
  • Posts: 108
set view by drawing center
« on: September 05, 2017, 05:21:02 PM »
In dcad 2016 64 bit I find that "set view by drawing center" is grayed out in the view menu, though it works if I click the icon. When I set a keystroke for this command the keystroke shows in the view menu, but it's still grayed out and the keystroke doesn't work. Any ideas how to fix this?

Rob S

  • Hero Member
  • *****
  • Posts: 4381
    • Construction Estimating Program for General Contractors
Re: set view by drawing center
« Reply #1 on: September 05, 2017, 08:51:23 PM »
Mine only greys out in 2D mode, which makes sense.  3D mode works fine.

Have you downloaded the 2016.2 update?   Don't know if that was affected in any way, but it might be worth a try
User since Pro-design

rccon

  • Full Member
  • ***
  • Posts: 108
Re: set view by drawing center
« Reply #2 on: September 06, 2017, 08:30:24 AM »
I just installed the 2016.2 update, but "set view by drawing center" is still grayed out. Any more ideas?

bdeck

  • Hero Member
  • *****
  • Posts: 825
Re: set view by drawing center
« Reply #3 on: September 06, 2017, 09:40:46 AM »
Try this:

http://forum.designcadcommunity.com/index.php?topic=5522.msg37962#msg37962

Arrows and + - to navigate.
x to set drawing center.
r to cycle through 4 hardware rendering modes.
h for help menu

You may want to comment out one or both of the following pairs of lines, depending on your viewing preference.

147:   if ax<-180 then ax=(360+ax)  'change display angle from 0-360 to (-180)-(+180)
148:   if ax>180 then ax=(ax-360)   'change display angle from 0-360 to (-180)-(+180)

150:   if ax>90 then ax=90   'do not rotate beyond north pole
151:   if ax<-90 then ax=-90   'do not rotate beyond south pole

bd

rccon

  • Full Member
  • ***
  • Posts: 108
Re: set view by drawing center
« Reply #4 on: September 07, 2017, 07:24:20 AM »
bdeck, thanks for the macro. I think I will find it useful, but I'd still like to get "set view by drawing center" working by keystroke, so I'll make another appeal. I can't see why the command would be grayed out on the menu when it works by clicking the toolbar icon, and it makes me think there is something I should learn about menu operation. Can anyone help?

Dr PR

  • Hero Member
  • *****
  • Posts: 5472
Re: set view by drawing center
« Reply #5 on: September 07, 2017, 07:37:07 AM »
rccon,

Are you using the 2D only DesignCAD or the 3D DesignCAD 3D Max?

Are you working in 2D or 3D mode? The "Set View" and "Set View by Drawing Center" commands work only in 3D mode (Reference Manual pages 122-123). When you switch to 2D mode they are grayed out and these functions do not work.

This is how the program has worked at least as far back as V15.

Phil
DesignCAD user since 1987

DrollTroll

  • Kindly Curmudgeon
  • Administrator
  • *****
  • Posts: 4175
Re: set view by drawing center
« Reply #6 on: September 07, 2017, 08:39:03 AM »
rccon, what keystroke did you assign to Set View by Drawing Center? Shift-C seems to work ok for me -- the command still remains active (in the not-grayed-out sense) even in an empty drawing.

And did you also customize the menu?
« Last Edit: September 07, 2017, 08:43:55 AM by DrollTroll »
25 years with DesignCAD

rccon

  • Full Member
  • ***
  • Posts: 108
Re: set view by drawing center
« Reply #7 on: September 07, 2017, 09:12:36 AM »
DT, I am using a custom menu, but this seems to have caused no problems for other commands. But now I have a much bigger problem. In trying to set a keystroke for bdeck's viewer macro, I managed to get rid of all of my custom keystrokes that apply to macros. I loaded my customkeys.dka file which I thought was governing the keystrokes and they all quit working, so now I am trying to remember how I got them all working in the first place. You had helped me figure out this file a few years ago and I'v got my notes explaining what the numbers mean, but I think now the dka file wasn't controlling the keys after all, but they are stored in some secret place other than dc3maxkey.ini that was generated as I set the keystrokes in options.

The macro keystrokes are still working in dcad 21. Is there a file I can copy from the dcad 21 folder to the dcad 2016 folder to get them back and not have to reset them all again? I have about 30.

bdeck

  • Hero Member
  • *****
  • Posts: 825
Re: set view by drawing center
« Reply #8 on: September 07, 2017, 01:51:35 PM »
rccon,

Keys:
When DC starts, it uses DC3MAXKEY.ini and DC3MAXKEY.sys as its default keyboard definition files. (presumably in c:\Users\(user)\Documents\DesignCAD 3D MAX 2016....)  When you hit "SaveAsDefault" in the options/keyboard  dialog, DC saves the current keyboard configuration as DC3MAXKEY.ini and DC3MAXKEY.sys. When you hit "Save"  in that dialog, DC allows you  to save the current keyboard configuration as a dkf or dka file.

From the "Load" button you can browse and load dkf (or dka) files from older versions. In fact, my "Custom Keyboard" location (q/file locations) is permanently set to a location used by all my DC versions.  Any of these can be loaded and then saved as default. Also, when you first start up DC, you can save a dka file for comparison with custom dka files.

View:
Can you run SetView, or setv, or ID_VIEW_REALTIME, or ID_VIEW_REALTIME_CENTER,
from the command line?  If so, then the following macro could be assigned to a key until DT gets you sorted out:
Code: [Select]
>setview     ' or >ID_VIEW_REALTIME, or >ID_VIEW_REALTIME_CENTER, or >setv
{
}

I also notice from another thread that your menu file is apparently either corrupted or from an older version of DC (It was missing "Print Section").  Total Commander has a nice file compare function for comparing all your files to previous versions. https://www.ghisler.com/download.htm

DKA files:
First Column = shift status
Unshifted key =2 or 3
Shift= 7 (add 4)
Control = 11 (add8)
Control + Shift= 15

Second Column = hardware key code
  Can be determined with "anykey x; print  x; anykey" in a macro
for example:
83  =   S   
115  = F4  (not s)

Third column = command code
   From DC3MaxCmd.ini
       Or (for macros or executables)
   From D3MAXKEY.INI 

Finally, are you using RedSDK? (dunno if this matters)
Regards,
bd
« Last Edit: September 10, 2017, 01:04:36 PM by bdeck »

rccon

  • Full Member
  • ***
  • Posts: 108
Re: set view by drawing center
« Reply #9 on: September 08, 2017, 09:47:41 AM »
BD, your suggested macro did the trick. alt+v now gives me "set view by drawing center" although I'm still mystified why it would be grayed out in the menu.
As to the missing "print section" in the menu, that's because I'm using a custom menu file that I got from one of you power users some years ago, with changes made by myself. Once I learned of it's existence, I found it and put it back.

Here is what happened on the custom keystroke issue. Three years ago I spent days trying to figure it out, learned from DT about .dka & .dkf files, dc3maxkey.ini, but maybe never understood it well enough because something would always go wrong. eventually I got everything working well by removing the .dka from my workspace and just setting the keys as default. This left the problem that if I tried to add a key and chose one already in use for a macro, I would see on the options screen not the name of the macro but just the number, eg 25500, which gave me no clue to which macro it was. So I annotated my .dka file, adding as comment the keys corresponding to the first two number groups, and using this as reference in case I forget a keystroke.  (As an occasional user of dcad, this sometimes happens).

Now the present difficulty. Yesterday, while setting a new keystroke for your viewer, I forget my earlier decision not to use .dka and loaded it. This caused all of my keystrokes to stop working. Remembering then about the problems caused by redundant lines in dc3maxkey.ini, I deleted that file, loaded .dka again and it regenerated accordingly, but still no keystroke worked. Maybe I should also have deleted dc3maxkey.sys, but since I can't read this file I thought this might be asking for trouble. I got everything back by re-creating all of the keystrokes and saving as default, also saving as a .dka, for reference, but never loading the dka. Then I copied my .dka to a .txt file so my annotations would be safe.

Now everything works, but I would like not to have to rebuild the whole set again. I don't want to try using the .dka file unless I can find out why it caused the loss of all the keystrokes. So I wonder, is it safe to delete dc3maxkey.sys, and would this help?  Could my annotations have caused the problem, even though all were preceded by ' ?  I have another computer, a clone of the one I am now using, so if I do any experimenting I will use that one.

Thanks for all your help. I could never have made use of designcad without you & others on this forum.   RC

bdeck

  • Hero Member
  • *****
  • Posts: 825
Re: set view by drawing center
« Reply #10 on: September 09, 2017, 01:48:10 AM »
rccon,
Within most "ini" files, comments are preceded by ";".  I believe the same is true for dka files. Dunno what a hyphen would do in a dka file if you saved it as default. Edit: The 3 consecutive semicolons ( ;;; ) in a dka file are functional. Otherwise DC would not be able to generate an ini file with macro addresses from a dka file.

The dc3maxkey.ini and .sys files can both be replaced manually, but that should never be necessary, since
   1) the "reset all" button erases them both; and
   2) they are completely replaced whenever you save new settings as default, whether changes are entered manually in the shortcut dialog, or  loaded from a dka or dkf file.

So I can open DC, save a dkf or dka of the current keyboard settings; then reset all; then load the just saved file; and save as default. Things should be as if nothing has happened.
         
I use mainly dkf files (Only out of habit).  My few dka files have the same name as their coresponding dkf files.

Regards,
bd
« Last Edit: September 09, 2017, 09:11:41 AM by bdeck »

rccon

  • Full Member
  • ***
  • Posts: 108
Re: set view by drawing center
« Reply #11 on: September 09, 2017, 12:42:34 PM »
It finally occurred to me that my dka file might be contaminated in some way that didn't show in the text editor. So I went to my backup computer, verified that loading the dka would disable all my keystrokes, deleted it and saved a new one based on the default keys that I had re-created yesterday. Now it all works fine, even with my added keystroke descriptions. I guess it's a good idea to have multiple custom key files in case one goes wacko.

Dr PR

  • Hero Member
  • *****
  • Posts: 5472
Re: set view by drawing center
« Reply #12 on: September 09, 2017, 07:25:02 PM »
rccon,

Occasionally some of the key definitions are changed as new features are added. When this happens old key codes no longer work as expected. I think the last time this happened was with the  V20-V21 change.

Read the release notes. If key codes change it will be mentioned there.

One great thing about DesignCAD is that it maintains backward compatibility with older files. But on rare occasions something has to be changed. I can recall having to rebuild my keyboard definitions at least twice in the last 30 years.

Phil
DesignCAD user since 1987