Jump to content
Developer Wiki and Function Reference Links ×

Setting Page location


ionw

Recommended Posts

I am trying to generate a Reset Drawing command for the office. Basically a one stop script that combines preference settings, document settings, and saved views. I have it already configured to reset mostly everything I want, but page location. I realize there is no way to reset Page Setup to choose a page size, but I would like to reset the Page location. It is off of the origin, by -3/4" in the X-Axis, so the double click of the Page Move tool doesn't quite accomplish what I want.

Does anyone know if this is possible?

thanks,

ion

Link to comment

Thanks for the input Raymond, but in essence, this is doing the opposite of what I want to happen. I want to move the Page center back to a set distance off of the origin. We had issues a few years back with people moving origins on Workgroup Referenced files, before we had the ability to ignore user origins. So people around here will move the page, but not the origin.

Thanks,

ion

Link to comment

Yeah I was considering it, but am a little leery. My dabbling in the DrawWhatIAmThinkingNotWhatIDid(Tool,MarginOfError); procedure left me wanting. Seemed really powerful, but the results ended up seemingly random. When I invoked it, it would consistently draw Alpine Skiing scenes, and equipment for some strange reason. My other tester kept getting oddly wonderful curvilinear shapes, couldn't quite understand what they were...

thanks for the input,

ion

Link to comment
My dabbling in the DrawWhatIAmThinkingNotWhatIDid(Tool,MarginOfError); procedure left me wanting. Seemed really powerful, but the results ended up seemingly random.

Really? Using that, if I'm working on a house, I always get the Schr?der-Schr?der House; if an apartment block, the Aalto Hansaviertel building; if a public building, Mies's Barcelona Pavilion and so on. Nothing random there.

Link to comment

Ion,

???Try using:

SetPrefReal(68, newXvalueOfPageCenter);

SetPrefReal(69, newYvalueOfPageCenter);

???I've not used them before, but in a very cursory trial it appears you might really want to use:

SetPrefReal(69, -YvalueOfPageCenter);

???Not sure why, but it appears positive values of X move the page right (as expected) but positive values of Y move it down. This may be a throwback to screen coordinates where (0, 0) is in the upper left corner and all values on the screen are positive (just guessing).

???Be careful if the page and the user origin were both moved. I think Pref68 & Pref69 reference absolute coordiantes, not User coordinates. Some subtractions may be required.

Good luck,

Raymond

Link to comment

I did find it in the vwhelp appendices, but only because I knew, thanks to you, what to look for.

It turns out that I did have to use a negative value to move the page down, so proper behavior, rather than the suspected misbehavior.

I spent some time on VCOR, today as well, thanks to a code sample you put up a while back on DialogBuilder. Once I had the reset tool working, I realized that I had to set it differently for our three sheet sizes, very small differences, but differences nonetheless. I went off to the documentation, the examples didn't work. So I searched the discussion board and found your No Frills Dialog code sample. Got that working, modified it to use Radio Buttons and booleans. Thanks to your sample, some discussions on VCOR, and tinkering now I am integrating that into the reset tool, so that it is preset for what we use 85% of the time, and they only need to hit return to dismiss "our" lovingly crafted dialog, or select the sheet size to get the proper print location.

Also to confirm your suspicion it is based on the absolute origin, not user origin. Which for us, is a good thing.

Cheers,

ion

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...