ccroft Posted November 10, 2007 Share Posted November 10, 2007 As witnessed by our friend Petri's trials and tribulations something has. Is it the way object regeneration is handled? Is it the way $INCLUDE works? Is it the way regeneration works with $INCLUDE? He has scripts that work in 12 and not 13. What's the difference? I'd like to know what's happening so that I can start preparing for the inevitable. Is Mr Chandler in the house? (he's been known to visit from time to time) Charles Quote Link to comment
Charles Chandler Posted November 19, 2007 Share Posted November 19, 2007 Hi Charles, I've been hiding... I haven't yet made complete sense of the various posts to which you're referring, but I don't think Petri's problems are VW 2008 problems. Off the top of my head, the major changes in 2008 are: * Colors work differently. For more info, see: http://www.vectorlab.info/index.php?title=Colors_in_VectorWorks_2008%2B * Markers work differently. I think the documentation for all of that is still in the works. * The new rotated coordinate system might cause problems for plug-ins that need to be rotation-sensitive. So far as I know, there have not been any changes in the fundamental object (re)generation mechanism, nor in the way includes are handled. To be any more specific than that, can you boil down the questions a bit? Regards, Charles Quote Link to comment
ccroft Posted November 20, 2007 Author Share Posted November 20, 2007 Thanks for dropping by! Well...I've been trying to boil those questions down in my responses to Petri's probs, but that's about as far as I've been able to get. It makes me paranoid when people say their stuff works in 12 but not 13. I did post this a while back to try and see if the problems he's having are more widespread. Fact is, if there were such fundamental and fatal flaws, this forum and the mail list would be burning up. Been pretty quiet over there. Later c Quote Link to comment
_c_ Posted November 20, 2007 Share Posted November 20, 2007 Well, for one, we have support for aliases in includes again, now.... There are a number of improvements too in the behaviour of List Browsers' routines. orso Quote Link to comment
Gerard Jonker Posted November 24, 2007 Share Posted November 24, 2007 (edited) Hi Charles and Charles, Most of my commands still work I had some minor fiddling to do in about 10 of the 250 commands I made over the years. (I still ship them all, if you don't, there will always be someone complaining) Hi Charles, Off the top of my head, the major changes in 2008 are: * Colors work differently. For more info, see: http://www.vectorlab.info/index.php?title=Colors_in_VectorWorks_2008%2B That is a wonderful piece of work. The colours in VW, but also the article. Thank you Charles! * The new rotated coordinate system might cause problems for plug-ins that need to be rotation-sensitive. This has been causing some headaches though. To save myself some time testing I thought I could use a shortcut: Unrotate the plan, unshift the origin, do my stuff and then move and rotate everything back again. In their wisdom, NNA is forcing me to take the Rotated Plan View head on. For now they disabled setprefreal(93,A); - A bug you say? Naaah, you are just being modest. BTW, I love VW 2008. It is quite stable, as long as you are not scripting. Testing / editing scripts will eventually bring the program down, but not before making you question every previous result. As a few test runs before death kicks in, you get some really strange results. But for day to day drafts work it is just great. Thank you NNA, Gerard Edited November 24, 2007 by Gerard Jonker Quote Link to comment
islandmon Posted November 24, 2007 Share Posted November 24, 2007 BTW, I love VW 2008. It is quite stable, as long as you are not scripting. Testing / editing scripts will eventually bring the program down, but not before making you question every previous result. As a few test runs before death kicks in, you get some really strange results. But for day to day drafts work it is just great. You could be a speechwriter for GWB ... the word "Orwellian" ... comes to mind .. Quote Link to comment
MullinRJ Posted November 24, 2007 Share Posted November 24, 2007 You could be a speechwriter for GWB ... Nah, Gerard is completing his sentences. Quote Link to comment
Petri Posted November 24, 2007 Share Posted November 24, 2007 Is he really? Were they concurrent? Quote Link to comment
ccroft Posted November 24, 2007 Author Share Posted November 24, 2007 Thanks for posting this Gerard. 96% success rate is very encouraging. Don't know if I can say the same for this part though: BTW, I love VW 2008. It is quite stable, as long as you are not scripting. Maybe I'll start cleaning up some of the older more disorganized stuff now to make it easier to trouble-shoot come upgrade time. I think they call it 'refactoring': organizing for easier maintenance. My early stuff is really hard to follow. Quote Link to comment
Gerard Jonker Posted November 25, 2007 Share Posted November 25, 2007 (edited) Is he really? Were they concurrent? mmm. Thank you Raymond, but Petri is right. Not the most beautiful proza I ever wrote. Let me try again: Drafting in VW 2008 is just great. Period. A little bug here 'n there, nothing serious. The program feels as stable as 12.5.0 (more or less). Now for scripting. Let's forget all the Rotated Plan View stuff for a second or two: Nothing really changed. Almost all your VW 12.5.0 scripts and Plug-ins will still work. But when you start writing a new one, things get trickier. Start with a new file. Then after a few hours of opening and closing the editor. You decide to send the test file to a friend, so you save it. Exit VectorWorks. The Save command is not effected, only Save as... takes a wrong turn. (I use BBedit for the long run, testing portions of code I like to do in palette scripts, using the option-double click to edit.) Next, we'll start operating on objects in a Rotated Plan View. Now you understand why I needed all these hours of testing scripts and why my writing is getting "coherently challenged": 1 place a Locus on (0,0); 2 Place another Locus at some point in the document, as long as it is not the origin. 3 Page menu, Set Origin..., at the second locus 4 Rotate Plan View. {not too much though, say 10?} Now it looks like this: 5 Run the following script, trying to draw a square and a circle between (0,0) and (1000,-1000): arc(0, 0, 1000, -1000, 0, 360); rect(0, 0, 1000, -1000); I got a circle alright, but it is not starting at (0,0) and the rect is not a square, also not starting at (0,0), as you can see in the image below: Silly me, I forgot to use ScreenVecToModelVec. Let's try again: procedure test; VAR A, B, C, D :Real; BEGIN A := 0; B := 0; C := 1000; D := -1000; ScreenVecToModelVec(A, B); ScreenVecToModelVec(C, D); arc(A, B, C, D, 0, 360); rect(A, B, C, D); END; Run(test); And this is what we get: The rectangle is a square this time, but the circle is now an approximation of an ellipse. Note how in the case of the circle, its Top Left corner seems to be misplaced in both occasions. It misses the spot with about 10? both times, the first one is +10? the other one is -10?. (pus or minus the PlanView Rotation). Sigh... Hoping GWB will not even think about hiring me after reading this post, Gerard Edited November 25, 2007 by Gerard Jonker Quote Link to comment
Petri Posted November 25, 2007 Share Posted November 25, 2007 Fascinating... Lucky for me, I don't have too many scripts that draw in the "drawing space", mainly PIOs. And thanks for the insight! With my hit rate of finding stuff in VS-documentation, I probably would never have found that vector conversion thing. But, Gerard - do I understand correctly: you have had problems editing PIOs in VW 2008, too? Quote Link to comment
Gerard Jonker Posted November 25, 2007 Share Posted November 25, 2007 Not really. Most changes were for the new colour scheme. As you say, the PIO's are relatively immune to the Rotated Plan View as they are drawn in their own secluded space. I have to update a few separate scripts that place PIO's that is it. Before I started updating those scripts I thought it would be a good idea to understand the Rotated PlanView. Hence my findings. Gerard Quote Link to comment
islandmon Posted November 25, 2007 Share Posted November 25, 2007 Mr SquirtGun ... you are amazing ... thnx for that tutorial ... Last nite in the wee hours .. i was thinkin' about Vectorscript issues big & small ... and how utterly non-intuitive, finicky, incomprehensible, and nonstandard a translator it has become since the mini-pascal days... it takes a true genius like Gerard or Charles or Petri, et al ... to make any sense with it ... Now .. take a look at Quartz Composer app. included free with the OSX Dev Install. The left frame is the functions Menu ... top frame the Layers&Groups ... center frame the playground .. then a separate window showing the performance. I was able to accomplish more in the first ten minutes with the Composer GUI than days spent dicking around with VSS scripting... Nuf said ... Quote Link to comment
Petri Posted November 25, 2007 Share Posted November 25, 2007 Mini-Pascal... The days of innocence... These, on the other hand, are days of miracle and wonder. The smallest of scripts is 400 lines of code - and I'm not even doing Modern Dialogs! Quote Link to comment
Gerard Jonker Posted November 25, 2007 Share Posted November 25, 2007 These...are (the) days of miracle and wonder. Paul Simon, Graceland, The Boy In The Bubble. I prefer the "Classic" dialogs over the modern, but I am so afraid one day I'll find the "Classic" dialogs are obsolete and I will have to redo all dialogs. So against "will and thanks" I am an adopter of the modern dialogs. Quote Link to comment
Petri Posted November 25, 2007 Share Posted November 25, 2007 Naww... They can't make the fast & simple classic dialogs obsolete! (Or can they? In fact, they can. They can also make Modern Dialogs obsolete and replace them with undocumented & version-dependent NNA_Dialogs. FUNCTION vsmDialogXYZZY(a : INTEGER; b: LONGINT; c: REAL; d : REAL; e : REAL; f : STRING; g: STRING; h : CHAR, i : DYNARRAY OF INTEGER; j : A_VARTYPE_WE_DO_NOT_REVEAL_TO_YOU_SUCKERS_HA_HA_HA;): BOOLEAN; Quote Link to comment
MullinRJ Posted November 25, 2007 Share Posted November 25, 2007 FUNCTION vsmDialogXYZZY(a : INTEGER; b: LONGINT; c: REAL; d : REAL; e : REAL; f : STRING; g: STRING; h : CHAR, i : DYNARRAY OF INTEGER; j : A_VARTYPE_WE_DO_NOT_REVEAL_TO_YOU_SUCKERS_HA_HA_HA;): BOOLEAN; It sounds as if you are on the verge of a sad realization, or about to enter a maze of twisty passageways, all alike. Quote Link to comment
Charles Chandler Posted November 26, 2007 Share Posted November 26, 2007 Back to the issue about creating rectangles and circles in the new rotated coordinate system... To make it possible to create these objects without having to worry about the aspect ratio (that changes when the coordinate system is rotated), 3 new calls were created: RectangleN, RRectangleN, and OvalN. These allow you to specify the rotation of the object, and then the bounding box of the object within that rotation. Quote Link to comment
Gerard Jonker Posted November 26, 2007 Share Posted November 26, 2007 Hi Charles, Does that mean Arc and Rect are obsolete from now on? Gerard Quote Link to comment
Charles Chandler Posted November 28, 2007 Share Posted November 28, 2007 Inside objects they're still OK, but in menu commands or in tools, you "might" want to switch to the new calls. I just talked to somebody at NNA, and turning off plan rotation at the beginning of a script, and then turning it back on at the end, should still work. I just tested it in 78970, on Windows, and it works. PROCEDURE Example; VAR isPlanRotated :BOOLEAN; planRotationAngle :REAL; BEGIN isPlanRotated := GetPref(92); IF isPlanRotated THEN BEGIN planRotationAngle := GetPrefReal(93); SetPrefReal(93, 0); SetPref(92, FALSE); Rect(0, 0, 1, 1); SetPrefReal(93, planRotationAngle); SetPref(92, TRUE); END; END; RUN(Example); Note the belt-and-suspenders thing going on, with setting the plan rotation to 0 AND turning off plan rotation at the beginning, and then resetting the rotation angle AND turning plan rotation back on at the end. This was recommended (especially the part at the end). So before you switch all of your Rect and Oval calls, you might try this. Quote Link to comment
Petri Posted November 28, 2007 Share Posted November 28, 2007 Fundamentals does not have Plan Rotation, right? So, in all menu commands and tools, one needs to find out which VectorWorks the user is working with? This is getting complicated. I can't recall that something like this would have been submitted when the notorious "Industry Series" were introduced. The Rich Pledge was that they will provide additional functionality... Quote Link to comment
Charles Chandler Posted November 28, 2007 Share Posted November 28, 2007 No, I think you just put in the code, and then in Fundamentals, it just won't do anything. Quote Link to comment
Petri Posted November 28, 2007 Share Posted November 28, 2007 OK. This is acceptable. When the file is then opened in, say, Architect, the code does it's magic; when later in Fundamentals, things are normal? (How annoying that one cannot install Fundamentals with Designer installer...) Quote Link to comment
C. Andrew Dunning Posted December 18, 2007 Share Posted December 18, 2007 To make it possible to create these objects without having to worry about the aspect ratio (that changes when the coordinate system is rotated), 3 new calls were created: RectangleN, RRectangleN, and OvalN. These allow you to specify the rotation of the object, and then the bounding box of the object within that rotation. Where can we get more info on these calls - what their syntax and variables are and how they funtion relative to, let's say Rect? Thanks! Quote Link to comment
Gerard Jonker Posted December 18, 2007 Share Posted December 18, 2007 In the VectorScript Function Reference: RectangleN Objects - 2D Declaration: PROCEDURE RectangleN ( orginX :REAL; orginY :REAL; directionX :REAL; directionY :REAL; width :REAL; height :REAL ) ; Description: Creates and returns a handle to a new rectangle object with the specified bounds. It doesn't return a handle. Unfortunately, I would have appreciated that. Gerard 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.