ionw Posted October 9, 2007 Share Posted October 9, 2007 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 Quote Link to comment
MullinRJ Posted October 10, 2007 Share Posted October 10, 2007 Have you tried using SetOrigin() or SetOriginAbsolute()? I'd normally think longer on this before responding, but I have to run. Raymond Quote Link to comment
ionw Posted October 10, 2007 Author Share Posted October 10, 2007 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 Quote Link to comment
Petri Posted October 10, 2007 Share Posted October 10, 2007 UseClairvoyance(PageLocation, x1, y1, x2, y2)? Quote Link to comment
ionw Posted October 10, 2007 Author Share Posted October 10, 2007 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 Quote Link to comment
Petri Posted October 10, 2007 Share Posted October 10, 2007 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. Quote Link to comment
ionw Posted October 10, 2007 Author Share Posted October 10, 2007 Thou art a man of greater resolve than I! Live to ski, Work to ski, ski to live. Quote Link to comment
MullinRJ Posted October 11, 2007 Share Posted October 11, 2007 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 Quote Link to comment
ionw Posted October 11, 2007 Author Share Posted October 11, 2007 Thank you so much Raymond. While I had looked through the vectorscript reference and the procedure list, I had forgotten the appendices. I truly appreciate it, and I will get back to you on how it works in our situation. Cheers, ion Quote Link to comment
MullinRJ Posted October 11, 2007 Share Posted October 11, 2007 You're welcome, Ion. Had you looked in the VS Appendix you still wouldn't have found it, unless you looked at one of the "special" appendices maintained offline. Thank VCOR for publishing a more "special" list. Raymond Quote Link to comment
ionw Posted October 12, 2007 Author Share Posted October 12, 2007 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 Quote Link to comment
Recommended Posts
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.