Reply
Solved! Go to solution

Perspective Drawing Views Focal Length - Macro

[ Edited ]

A Drawing View can be created from a 'saved view' in the model in perspective mode. The limitation with this is the perspective is applied to the drawing view but the saved view orientation is not.

 

To overcome this limitation, I wrote a macro that applies a perspective to a drawing view with a specified focal length. 

 

 

Download the macro from this page.

 

A related tip for setting perspective can be found on this page.

And another closely related tip regarding Raste-Vector view is here

 

Tushar Suradkar

www.SurfAndCode.in

 

10 REPLIES
Solution
Solution
Accepted by topic author Tushar
‎08-26-2015 04:32 AM

Re: Perspective Drawing Views Focal Length - Macro

Hi Tushar,

 

Thanks for this wunderful macro..  tried to download it from your page, but it is not listed there yet.

 

Could you publish it on that page?

 

Kind Regards,

 

Jan Bos

Geha

The Netherlands

 

Re: Perspective Drawing Views Focal Length - Macro

[ Edited ]

Hi Jan,

 

The download link is on the page mentioned in the post.

Look for the icon Download icon  on the page.

 

 

The link leads to a page where the downwloads are listed alphabetically.

Go down to S:

 

 

 The .PIZ needs to be renamed to .ZIP and the .EX_ file therein be renamed to .EXE

 

~Tushar

www.SurfAndCode.in

 

Re: Perspective Drawing Views Focal Length - Macro

Dear Tushar,

 

On the page that I'm directed to... is the file missing, see attached screenshot.

 

Gr.

 

 

Jan Bos

Re: Perspective Drawing Views Focal Length - Macro

Hi Jan,

 

Thank you for the follow up.

I noticed the file was flagged as abusive and Google had perhaps blocked it for viewing for safe browsing:

 

 

 

Is the new SetViewPerspective.piz file visible and can you also download it ?

Many thanks again.

 

~Tushar

 

Re: Perspective Drawing Views Focal Length - Macro

Still not visible..

Re: Perspective Drawing Views Focal Length - Macro

The new file too is found to be flagged as abuse, not visible again.

Pls download the program directly from the last link at the end of this new page.

 

~Tushar

Re: Perspective Drawing Views Focal Length - Macro

Hi Tushar,

 

Fantastic - How on earth does that work ?

Just one thing though - how do I remove the perspective from the view ?

HP Z420 16GB RAM
Quadro K4000
ST7 MP10 on Windows 7 Pro 64.

Re: Perspective Drawing Views Focal Length - Macro

[ Edited ]

Hi Jan, The DrawingView object has a SetPerspectiveOn method which takes the focal length as an argument.

There's another SetPerspectiveOff method available which however will need another macro to be called. I haven't written this macro yet.

 

As a workaround, set the focal length to a high value like 300 which will give an almost orthographic/isometric view.

 

~Tushar

 

Re: Perspective Drawing Views Focal Length - Macro

Tushar,

Couldn't you just add another button "Perspective OFF" to the form and have that call the SetPerspectiveOff method?

or if the user enters a value of 0 it could do the same.

 

When you have time of course.

HP Z420 16GB RAM
Quadro K4000
ST7 MP10 on Windows 7 Pro 64.