TheSwamp

CAD Forums => CAD General => Dynamic Blocks => Topic started by: surveyor_randy on December 24, 2007, 11:56:10 AM

Title: Dynamic Block in Paper Space reacting to viewport?
Post by: surveyor_randy on December 24, 2007, 11:56:10 AM
Is it possible to have a dynamic block that is in paperspace, but not in a viewport, retrieve the twist and scale of a viewport?  I have a feeling the answer is no and that I'll have to come up with a vba solution.  Happy Holidays everyone!
Title: Re: Dynamic Block in Paper Space reacting to viewport?
Post by: Mark on December 24, 2007, 02:36:57 PM
I can't see anyway to retrieve the twist but the the scale is fairly simple using an attribute and field.

vp scale
http://www.theswamp.org/screens/mark/shot-0231.png

twist
http://www.theswamp.org/screens/mark/shot-0229.png
Title: Re: Dynamic Block in Paper Space reacting to viewport?
Post by: surveyor_randy on December 24, 2007, 07:33:13 PM
I can't see anyway to retrieve the twist but the the scale is fairly simple using an attribute and field.

vp scale
http://www.theswamp.org/screens/mark/shot-0231.png

twist
http://www.theswamp.org/screens/mark/shot-0229.png


Do you know how to get a dynamic block to react based on that particular value?  (VP scale)  I created a graphic scale bar with different visibility states based on a user selected scale.  It would be nice to tie it into the viewport scale.

I guess I could always resort to having the scale bar place inside the viewport, but I don't like having drawings with north arrows and scales all over model space.
Title: Re: Dynamic Block in Paper Space reacting to viewport?
Post by: ronjonp on December 24, 2007, 08:12:07 PM
Maybe this will help you...I put it together to ensure all north arrows would match the twist angles of all viewports.

http://www.theswamp.org/index.php?topic=19285.0
Title: Re: Dynamic Block in Paper Space reacting to viewport?
Post by: surveyor_randy on December 26, 2007, 05:18:30 PM
Thanks guys.....

Ronjonp, that code looks pretty interesting and I think that I looked at it once before.  Your solution is a good one, but I would really like to design a dynamic block that would be linked to a viewport and react based on the settings of that viewport.  It doesn't look like what I would like to accomplish is possible (yet).  But I absolutely love working with dynamic blocks ever since I took the time to learn how they work!

I hope everyone here had an excellent Holiday!  The only thing that I got for Christmas was a bad hangover but hey, who's complaining!  :-D
Title: Re: Dynamic Block in Paper Space reacting to viewport?
Post by: T.Willey on December 26, 2007, 05:23:41 PM
You might be able to do it with reactors, but I'm not sure if DB's will allow it.  DB's might change each time you change the visible property, and such would break reactors attached to said DB, but that is a guess.
Title: Re: Dynamic Block in Paper Space reacting to viewport?
Post by: mjfarrell on December 29, 2007, 10:12:51 AM
I think that you can achieve close to what you are after using layout tabs in your DWT. (using the Plan Production tools in C3D)
I think Fields and Formulas will fill in the Bar Scale numbers for you.
Title: Re: Dynamic Block in Paper Space reacting to viewport?
Post by: surveyor_randy on December 30, 2007, 11:13:59 AM
Thanks for the suggestions!  Have a happy new year everyone!

I've looked into everyone's solutions and it looks like the only way to achieve my goal would be with a VBA routine to insert the block and retrieve the information I need from the viewport.