Jump to content


  • Content Count

  • Joined

  • Last visited

Everything posted by MullinRJ

  1. Sam, Was this of any help to you? Have you tried it yet? No hurry, just curious. Raymond
  2. There are 3 characters to be aware of when typing "dashes": - Hyphen (also called Dash or Minus Sign), – en dash, and — em dash. In Western Mac OS encoding (single byte characters): Hyphen, ASCII 45, Hex(2D), Hyphen key en dash, ASCII 208, Hex(D0), Option-Hyphen key em dash, ASCII 209, Hex(D1), Shift-Option-Hyphen key In Western Windows Latin 1 encoding (single byte characters): Hyphen, ASCII 45, Hex(2D), Hyphen key en dash, ASCII 150, Hex(96), type Alt-0150 em dash, ASCII 151, Hex(97), type Alt-0151 In UTF-8 the Hyphen (Dash, or Minus Sign) is still #45, but the en dash and em dash are multibyte characters; Hex E2 80 93, and Hex E2 80 94, respectively. Art mentions, "Often the minus key is both hyphen and N-dash", as seen in Word. Actually Word substitutes an en dash for a hyphen when a hyphen is typed, and that is a user preference that can be set, like substituting "smart quotes" for the singlequote and doublequote characters. I'm not sure if this helps, but VW sees all three of these characters as being different and will sort them accordingly. Raymond
  3. Patrick, I think FPenPat() is what you are after. The names are confusing. PenPatN() sets the active pen pattern (line style) for the document. FPenPatN() returns the active pen pattern setting of the document. GetLSN() returns the line style of the referenced object (by handle). SetLSN() sets the line style of the referenced object (by handle). HTH, Raymond
  4. And YES, -209 refers to the Symbol Tool.
  5. Michael, Look in the Vectorworks 201x Script Function Reference. There is an online copy at http://developer.vectorworks.net/index.php/VS:Function_Reference_Appendix#settool. There is an HTML version on your computer that can be found in the application folder; Vectorworks 201x -> VWHelp -> Script Reference -> ScriptFunctionReference.html. Look in Appendix E for SetTool-CallTool Selectors. All tool selectors will have negative numbers. Raymond
  6. Jim, If Art's link doesn't work, I'll be happy to convert them for you. I've got versions back to MC+2.0 running on a trusty G5. Raymond
  7. Hi Sam, Here's a script that works to move the progress bar 10 times, but does nothing useful. I split the process into 4 segments representing different portions of the progress bar (10%, 30%, 50% and 10%) each with 10% steps, though a simple process would have one segment of 100% with ten 10% steps. If you have questions, fire back. I'm too tired to go into any more detail right now. Have fun, Raymond PROCEDURE xxx; { Linear script showing how to move the Progress Bar 10 times. } { The "WAITs" simulate a longer process taking place. } { 2 Nov 2017 - Raymond Mullin } BEGIN ProgressDlgOpen ('Progress Bar Demo', False); ProgressDlgSetMeter ('REACTANCE (%):'); ProgressDlgSetTopMsg ('CAUTION! HIGH IMPEDANCE!'); ProgressDlgSetBotMsg ('RESISTANCE IS REDUNDANT!') ; ProgressDlgYield (0); { start at 0% } wait(1); ProgressDlgStart(10, 1); { first 10% } ProgressDlgYield (1); { Increment the progress bar } wait(1); ProgressDlgStart(30, 3); { next 30% } ProgressDlgYield (1); wait(1); ProgressDlgYield (1); wait(1); ProgressDlgYield (1); wait(1); ProgressDlgStart(50, 5); { next 50% } ProgressDlgYield (1); wait(1); ProgressDlgYield (1); wait(1); ProgressDlgYield (1); wait(1); ProgressDlgYield (1); wait(1); ProgressDlgYield (1); wait(1); ProgressDlgSetTopMsg ('THE'); ProgressDlgSetBotMsg ('END') ; ProgressDlgStart(10, 1); { last 10% } ProgressDlgYield (1); wait(1); { Next two lines not needed in VW 2017 & earlier } ProgressDlgStart(0, 0); ProgressDlgYield (0); wait(3); { Wait, so you can read last screen } ProgressDlgEnd; ProgressDlgClose; END; Run(xxx);
  8. Sam, When I get home tonight I'll post an example of a script I wrote. It took me a long time to figure out how to set it up. Hopefully I can remember how I got it running. It is very unintuitive, but it does work. Raymond
  9. Dom, Actually, you can copy text from the Message window, but you have to use the COPY command in the contextual menu. Select the text in the MESSAGE window, Right Click, Copy ... Paste elsewhere (any way you like.) I assume it works on Windows as it does on the Mac, but I have no idea why CMD-C doesn't work in the Message window. I just checked back to VW 2013 and it works at least back that far. HTH, Raymond
  10. Claes, When using Add Surface, I have found that limiting the selection to 200-400 objects is optimal for throughput. There appears to be an exponential slowdown based on the selection count. Waiting for 1000+ objects to ADD is intolerable for me, so I select small groups and Add Surface repeatedly. When done, I select the whole object and Add Surface again, but this is invariably a significantly reduced object count. If the resulting reduced object has over 1000 pieces, I'll carefully select contiguous pieces and add those. Using this approach I can be done with a 30k object count in under 5 minutes where VW night easily take 30 minutes to a few hours to complete in one pass. Raymond
  11. Pat, You're doing arithmetic after midnight (my time). You win. My mind is already mush. Please define "Late posts" – Are you counting posts after midnight, or posts we both try to answer? Who's the keeper of the tally? When did it start? What's the score right now? If this is a race from now to sunrise I think I'll concede – a good night's sleep vs. a beer; I'll gladly buy the beer ;-) Did I mention my mind is mush? Simple arithmetic - when it stops being simple, it's way past my bed time. That's been my litmus test for several decades now. It's how I tell myself I need to go to bed. g'night... Raymond
  12. Pat, it figures you'd get here first. I posted an answer in an older post, a half a day late and 50¢ short. I really should read all posts before answering any. Raymond
  13. Martin, I am seeing the same behavior in VW 2017 and VW 2018 when ungrouping. If there is a record attached to a GROUP, I get a dialog asking if I want to attach the GROUP's record to the objects inside the group. Do you get this dialog when you ungroup? Did you ever click the "Always do the selected action" box? If you did and then pressed NO, that would explain why you don't get this dialog and your objects never get the GROUP's records when you ungroup. To reset this setting, go to VW Preferences under the Session tab and click the "Reset Saved Settings..." button. Pick how much you want to reset and click OK. HTH, Raymond
  14. David, As Jim stated above, the compiler in SP1 will accept the NBS character ( and maybe others ) without kicking an error. If you can wait a few days (I'm guessing here, based on Jim's "imminent" estimate) you won't have to edit anything. Raymond
  15. My answer to David (in a PM) was his PIO's have Non_Breaking_Space (NBS) characters in his code and the compiler does not like single_byte characters in the Extended ASCII range (#128-255) . The NBS character is a High Order ASCII character (#160 decimal). UTF-8 only accepts ASCII in the 0-127 range. It is a relatively simple process to replace all NBS characters \x{A0} with TABs \t or SPACEs. I was able to edit the .vsm file in TextWrangler (yes, I still have a copy), replace all NBS with TAB, then save. The file then compiled and ran. It would be very easy to 10, 50, or 100 .vsm files in succession. BUT, BE WARNED. THIS SHOULD ONLY BE DONE ON COPEIS OF YOUR ORIGINAL PLUG-IN FILES!!! MAKE BACKUPS, THEN DO YOUR SURGERY. The NBS character is not the only character that will cause compiler problems, but it is a very common character to encounter, AND it is nearly invisible. It looks exactly like the SPACE character (#32 decimal). Any character in the Extended ASCII range (#128-255) will cause problems. For more elusive problems, it may be necessary to use a HEX Editor to see exactly what characters are in your files. HTH, Raymond
  16. David, Would you please send me one of your troubled PIO's? I'll tell you what I find. It shouldn't take posting your code to a website, and copying it back to clear the cobwebs. I'll send you my email address in a PM. Thanks, Raymond
  17. David, I pasted your script into VW 2018 (into both a Palette Script and a Menu Command) and it worked perfectly. Perhaps it is the menu PIO you migrated from VW 2008 that is kicking an error, but I can't test that here. Try creating a new one in VW 2018 and migrate your script to it. If the error persists, it's in your code. If it runs, it's your old Menu Command. If you copy your text out to an external text editor, then copy it from there and paste it back into the VS Editor, does it compile? One trick I've used to clear unseen cobwebs is to CUT everything out of the script Editor, close/save it, run the empty script (which forces the compiler to compile the empty file, which will execute without errors), then reopen the Script Editor and past the text back in. Sometimes that's all it takes. A more likely cause is VW 2018 now runs entirely on Unicode (UTF-8 for scripts, UTF-16 internally). If there are any high-order ASCII characters in your code (chars 128-255 are illegal one-byte characters in Unicode), like a Non-Breaking-Space character, you will get strange errors. BBEDIT or something similar can help you isolate any "odd" characters, or translate them to UTF-8 encoding, at which point they will compile as they always have. Save a Latin-1 encoded file as UTF-8, then copy that text to the script editor and it will work. Let us know how your next round fares. Raymond
  18. Hello Martin, Your problem lies in your choice of variable names. In this case it is "lineType". The compiler must have it tagged with another meaning in criteria statements, although I did not find it listed as a KeyWord. Change it to "lineTypes", or "lineTyp", or "line_Type" and your script will work in VW 2018. That said, your script could be written as a one-line VectorScript: SelectObj( (C = 'sides') AND V ); Unless you intend to expand your script where it needs more lines and/or variables, this one line does the same thing as the 12 lines in your script. Also note that you are using variable and procedure names that are already pre-defined VS commands, like "line" and "Poly". Although this usually works as you intend, it can sometimes cause you problems in more complicated scripts and it should be avoided. Been there, done that, spent hours trying to figure out why a script that compiles doesn't run. Raymond
  19. There is also ResetBBox(handle2SymbolPlacedInYourPIO). I've used this successfully OUTSIDE a PIO to get updated text to display. No promises, but worth a try. Raymond
  20. PS - Also try setting the fill colors to something other than WHITE. It may make it easier to spot when it does get applied.
  21. Sam, Have you tried SetFPat()? This will override the document setting for Fill_Pattern. TextOrigin(0,0); CreateText(concat(distbase, CHR(39))); SetFPat(LNewObj, 1); { sets fill pattern to solid background, which uses the background fill color } or SetFPat(LNewObj, 2); { sets fill pattern to solid foreground, which uses the foreground fill color } HTH, Raymond
  22. Jim, I want to thank you personally for handling ALL of the advance Teasers, for being the Messenger, and the Dart Board. It is a job extremely well done. You are truly a multifaceted vortex of talent and responsibility. There is no way anybody will know what is on the table before them until AFTER they have supped. May you survive the meal until the dessert plates are cleared. VW 2018's design blended with current technology is a gift to any user who understands the value of a custom tool he or she helped influence, and though I haven't tried most of what is offered, I am thoroughly impressed with the Multiple View Panes, the Unicode implementation, and Plug-In Styles. Multiple View Panes is flashy and everybody will see it in action and understand it right out of the box. The Unicode handling is much more subtle. It will take people longer to appreciate it, but it will be one of the first things they will miss when they try to use older versions of VW. Plug-In Styles may be tricky for some to grasp at first, but it is an excellent way for VW to organize a huge volume of design differences for each manufacturer's library. This approach to managing resources revolutionizes how VW users will handle many large catalogs from an ever expanding source of suppliers. Congratulation to you and all your co-workers. It's time to take a deep breath and relax for 5 minutes. See you at the Summit, Raymond :-)
  23. I am not the expert you are looking for, but when I used the PL tool everything was good until I made a mistake. Trying to remove a vertex an add one back was so unintuitive (it was an Arc vertex) that I did better by drawing lines and arcs, composing them, then converting the polyline into a PL object. I'd like a lesson on how to enter and modify data for this tool, too. Raymond
  24. Now it's official. You two are bound by Script-ure. ;-)


7150 Riverwood Drive, Columbia, Maryland 21046, USA   |   Contact Us:   410-290-5114


© 2018 Vectorworks, Inc. All Rights Reserved. Vectorworks, Inc. is part of the Nemetschek Group.

  • Create New...