×
INTELLIGENT WORK FORUMS
FOR ENGINEERING PROFESSIONALS

Log In

Come Join Us!

Are you an
Engineering professional?
Join Eng-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Eng-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Jobs

trimetric view macro I'd like to share

trimetric view macro I'd like to share

trimetric view macro I'd like to share

(OP)
I have a macro I wrote that I'd like to share.  It's pretty nifty in that it pulls up dialogs that let you specify precisely where you want the view to be.  It allows you to specify the angles between your viewpoint and the top and right planes.  Then radio buttons allow you to specify whether you want to be above or below the top plane, in front of or behind the front plane, and whether you want to rotate CW or CCW about the Y axis.  The large create button will position the view as specified and if that's not to your liking, you can change the variables and hit create again to change it until it's as you want.  Then you can name the macro as you wish or keep the default.  Finally, when everything's to your liking, you can hit the done button, and only then with the view actually be created and inserted into the view listing.

The problem is that the main routine of the macro simply calls up a user form and ends.  The actual computations and manipulations are done from within the form, and while I can post that code easily, the information about the form's layout and naming conventions are lost, and the code is useless without that.  I guess what I'm looking for is some way to post the binary.  I know that brings with it all kinds of problems, but it can be reviewed for bugs/malicious code by both the moderators of the site and the people who download it.

I simply don't know enough VBA to create the form completely within the main code of the macro.

RE: trimetric view macro I'd like to share

How Do I Make Files Available For Download? ... No Emails Required  FAQ559-1177

cheers
Helpful SW websites  FAQ559-520
How to get answers to your SW questions  FAQ559-1091

RE: trimetric view macro I'd like to share

Post it and let us try it.  I have tried a macro to help you set up your view called "setcamera.swp" found at http://swtools.cad.de/macros.htm  (the file is called "mm_20").  It's not very easy to set your view with this macro though.

Flores
SW06 SP3.0

RE: trimetric view macro I'd like to share

(OP)
Thanks, CorBlimeyLimey.

Here is the macro.  Feel free to spread it around, modify,  and keep it alive as needed.

http://www.savefile.com/files/3138573

I'm also interested in hearing about your thoughts on it.  Here's a better description of the macro.

I tried to make this intuitive without having to worry about right hand rules and placements and such.  When the macro runs, a dialog box will come up and you'll have several selections to make to pin down which of the 8 sectors of space around the part the viewpoint will be in.  You select each of the three hemispheres you wish and that sets the initial position of the camera.  If you pick back, right below, then the camera will be positioned below the part and behind it on its right side.  All three directions are taken relative to the part.  

Next, there are three text boxes. The first two allow you to specify the viewpoint angle as measured from the top and right plane.  If you enter 15 as the measurement from the top plane and have selected "below" in the option buttons, the camera will be 15 degrees below the top plane.  A similar procedure works for the second text box.  Finally, the last text box allows you to give this view whatever name you want

Once you have all the parameters entered, press the "preview" button.  The macro will then position the camera as you told it to.  If you don't like the view, simply adjust the settings and keep hitting preview until you get the view you want.  When the view is to your liking, click the "save" button, and the macro will then create the viewpoint with the name you gave it in the viewpoint manager.  Now, you're free to create another viewpoint.

At any time, if you press the exit button, the macro ends and does nothing further.

I hope someone finds this useful.

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Eng-Tips Forums free from inappropriate posts.
The Eng-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Eng-Tips forums is a member-only feature.

Click Here to join Eng-Tips and talk with other members!


Resources