Set View by View Center/Drawing Center

Started by PhredPhantom, December 29, 2008, 08:28:47 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

PhredPhantom

I'm using DCAD 18.2 with Windows XP.  I would like to know the best way to set the view in 3D by using the "set view by viewing center" icon/command.  What I really would like best is to be able to rotate the view around a particular point in the drawing.  For example, if I have a 3D box (or any other object) that is not located near the origin of the coordinate system and not near the drawing center, I would like to zoom in on the object and set (or select) a point around which to rotate the view by dragging with the mouse using the "set view by view center" icon.

I've searched the menus and the help file but have not been able to find how to do this.  I changed/moved the coordinate origin (0,0,0) location to a point on the object but it didn't seem to change the point about which the view rotates.  I'm probably overlooking a simple way to do this so any help would be appreciated.  Thanks in advance.

prl

Try the below macro.

'Program: vc.d3m (set view center then begin view orbit command)

if sys(1) = 0 then
  Setpoint "Set a point to view center . . ." 1
  if sys(1)=0 then end
endif 
 

>SetViewerPoints
{
  <Usepresetpoints
}


sys(1)=0



>setview
{
}


end

PhredPhantom

prl:

Thanks for the quick response.  Although I've used DCAD for several years, I haven't gotten into macros yet but I will try this one.  Do you happen to know a good way to do the same thing using the regular DCAD menus?

Thanks

Rick V.

Phred,

Set Viewer Points. I don't see this command in the pull-down menus (??) or in v18.2 help, but I have it in my View Toolbox (3rd from right in my View Toolbox):

1st point is Target position (pivot point).
2nd point is Viewer position (also seems to define viewer distance for pivot around a point).

After that, click Set View by View Center (not Set View by Drawing Center).
Hold down the left mouse button, move the mouse and it should pivot around the first point.

Dr PR

#4
Phred,

I'm with you on this one. I would like to have a simple function to set the view center for the "Set View By View Center" operation. Just point and click (gravity snap) to set the view center. It should be an on-going thing during the operation to allow you to reset the view center as many times as you want while rotating.

Rick explained how to accomplish what you want with a bunch of operations.

Often The "Set View By View Center" (the little black camera with arrows icon beside the orange one in the View Toolbox) will work well enough without fussing with "Set Viewer Points." You may have to use the "Scroll Bars" to reposition the view occasionally.

The "Set View" command may do what you want most of the time. Press the "Y" key, point to the screen and hold down the left mouse button. Now drag and the view rotates.
DesignCAD user since 1987

prl

Quote from: Dr PR on December 29, 2008, 10:44:26 AM
The "Set View" command may do what you want most of the time. Press the "Y" key, point to the screen and hold down the left mouse button. Now drag and the view rotates.

Long ago I learned that the standard "Y" key didn't orbit the model where I wanted it to.  My solution was to substitute the vc.d3m when the "Y" key is pressed.

prl

Quote from: PhredPhantom on December 29, 2008, 08:43:43 AM
Thanks for the quick response.  Although I've used DCAD for several years, I haven't gotten into macros yet but I will try this one.

You are missing one of the best DesignCAD features. 

prl

Quote from: Rick V. on December 29, 2008, 09:25:00 AM
I don't see this command in the pull-down menus (??) or in v18.2 help, but I have it in my View Toolbox (3rd from right in my View Toolbox):

Rick is correct, it seems to be missing.  For those that want it on a menu, you will need to save the default menu to file, then edit it as shown below (add the line in blue), and reload the menu.


.
.
.
      MENUITEM SEPARATOR
        MENUITEM "Show/&Hide...",               10385
        MENUITEM "Info &Box",                   10112
        MENUITEM "R&uler",                      10650
        MENUITEM "Aeria&l View",                9018
        MENUITEM SEPARATOR
        MENUITEM "Se&t View\tY",                10301
        MENUITEM "Set View b&y Drawing Center", 9084
        MENUITEM "Set Viewer &Points",          10086
        MENUITEM "Save &Current View...",       10197
        MENUITEM "User Defined Views...",       62025
        POPUP "Wor&king Plane..."
        BEGIN
            MENUITEM "Working Plane &Properties",   9090
.
.
.
.


Dr PR

Phred,

I tried prl's macro and it does work nicely. (OK, prl, you dragged me back into using macros. Who knows, I may even start writing them.)

In case you aren't familiar with using macros, here are a few ideas.

1. Create a folder somewhere safe - where an installer program can't mess things up. I use "C:\DedignCAD\macros" for my macros.

2. Copy prl's macro into notepad and save it in your macros folder with the file name "vc.d3m." The "d3m" file type tells DesignCAD that it is a macro file.

3. Tell DesignCAD where to find macros. Press the "Q" key to bring up the "Options" dialog and click on the "File Locations" tab. Enter your macro file location (select the "Macro" section and click the "Change" button). The files list is pretty hokey, an ancient hybrid of DOS and Unix, but it works.

While you are here be sure the "Keyboard" entry has a path and file name. It should default to "keyboard.dkf."

It is a good idea to move the "keyboard.dkf" file to your "safe" folder. If you don't future upgrade installations may overwrite it and all your changes will be lost. You can call it "anything-you-want.dkf." The "dkf" file type tells DesignCad it is a keyboard definition file.

4. Now click the "Keyboard" tab in the Options dialog. In the "Categories" list you will see the "Macro" entry. Select it. This opens your macro folder and lists all the d3m files in the "Files" window.

5. Select vc.d3m.

6. Now click the pull-down arrow in the "New Key" list (or just type in the key name).

7. Select the key you want to use. If the key is already assigned to something DesignCAD till tell you after the "Currently used:" entry. If you select the "Y" key it will say it is currently used by the "Set View" command. This is what I chose because I wanted to replace the default "Set View" function with prl's macro.

8. Click the "Save As Default" button. I'm not sure what this does, because the save isn't permanent until:

9. Click the "Save" button to save the changes in the keyboard definition file. This opens the folder you entered in the file list "Keyboard" entry.

10. Enter the keyboard file name "keyboard.dkf" or whatever you want to use and click the "Save" button.

Now the "Y" key will execute prl's macro every time you run the program.

Note: after installing an upgrade or new version you will need to change the "Options/File Locations" entries in order for things to work correctly. After making these changes you need to restart the program to make the keyboard changes and macros work.

Happy New Year!



DesignCAD user since 1987

prl

#9
Quote from: Dr PR on December 29, 2008, 05:31:38 PM
OK, prl, you dragged me back into using macros. Who knows, I may even start writing them.

I was hoping to do that. You'll appreciate DesignCAD even more.


And as a reminder to others, once you have a basiccad program you like, you can start the macro in several ways.

1.  menu
2.  toolbar icon
3.  hotkey (my favorite)
4.  command line (my second most favorite method)