Jump to content

MullinRJ

Member
  • Posts

    2,017
  • Joined

  • Last visited

Everything posted by MullinRJ

  1. Imt, I don't presume to know all the particulars, but I would think a VectorScript might address your problem. You'd have to execute the script in each file that needs updating, as a script cannot be run across multiple files at the same time, but that would still be easier than doing it manually. Try posting your question in the VectorScript section of the board. You might be able to export your good file as VectorScript and copy most of the code you need from there into a new script file. I'm sure someone can guide you to the right area of the VectorScript file to get you started. Raymond
  2. Hi Charles, You are welcome. If you are working in binary fractions, then use powers of 2 as you would powers of 10 for decimal precision. Or, more to the point, make your scale factor = 16. The ROUND function will snap things to the nearest 1/16. Actually, the INT function in my previous post is redundant. ROUND is similar to INT but has a little more savvy. =ROUND(HEIGHT*16)/16 =ROUND(WIDTH*16)/16 If you put your scale factor in a spreadsheet cell and reference it, you can change it easily. For example, set cell A1 to 16 then use: =ROUND(HEIGHT*A1)/A1 =ROUND(WIDTH*A1)/A1 Then change it to 8 to see if your counts change. They should if there is enough variation in your data. Try 4, 2, 1 & 32 for comparisons, or amusement. HTH, Raymond
  3. Hi Charles, I just tried what you did and get similar results for some Rects, and expected results for others. When exported to v8, I also get good and bad results, though the counts are different than in v11 (go figure). It does look like a rounding problem, but it's been here a while. Try these formulae: =INT(ROUND(Height*1000))/1000 =INT(ROUND(Width*1000))/1000 to give you 3 decimals of accuracy. Change the number of zeroes in the scale factor (1000 in this example) to get more or less decimal precision. Raymond [ 07-05-2005, 11:46 AM: Message edited by: MullinRJ ]
  4. Hi Charles, What happens if you export the VW11.5 file back to VW8.5? I'm not a guru of worksheets, but it may help if you list your summary formula. The error I reported earlier had to do with numbers being compared to 0. If they are any closer than about ?10^-13, comparison operators declare them to be equal (i.e., (3*10^-15 = 0) evaluates to TRUE). Sometimes this is a good thing, sometimes not. It depends on what you are doing and how picky you need to be. I don't think your problem is related, but I can't tell yet. Raymond
  5. Orso, Not sure where you get you default hatch. Are you opening a blank file, a template file or the "VectorWorks Default" file? Or perhaps opening a file from a previous version? 1.9685..." = 50mm (not so weird a number) Are you using a metric hatch? I exported a document in inches and mm and got the same output: hatchName1:= 'Default Hatch'; BeginVectorFillN(hatchName1,TRUE,FALSE,0); AddVectorFillLayer(0,0,1,1,0.176776695,-0.176776695,1,1,255); EndVectorFill; I don't use hatches, so I doubt I've ever changed it. VW11.5 mac Raymond
  6. Whew, that's good to hear. On first reading, I thought you wanted Larry to decompose. But then I figured you had to be referring to the Polygon. Heck, you live halfway around the globe from each other. You couldn't hate him that much ;-)
  7. I think Mike means, Decompose the Polygon, and does not wish you to do so. (correct me if I err, Mike) You can also use the "Convert to Lines" or "Convert Copy to Lines" menu commands. Raymond
  8. If you click in the drawing before a PASTE (not Paste-In-Place), VW will past the object(s) on the clipboard where you clicked. Is that what you are looking for? I use the mode often. Copy - Click-Paste - Click-Paste - Click-Paste, three copies arrayed just as I want them. It's fast and easy. Raymond
  9. Hi Bill, Thanks for the tests. Bug or not, the $INCLUDE functionality changed from v10 to v11. Yes, as far as I can tell, included files can only be resolved in v11 if they reside inside the VW application folder. Using shortcuts/aliases can get you outside that realm. Personally, I'd like to see it work they way it used to in v10, but I can live with using aliases for my hard drives in the VW App folder. All the best, Raymond
  10. Bill, What happens if you put the D:\ shortcut in the Plug-Ins folder instead of the application folder? Will {$INCLUDE D:\wff\vw\Scripts\EraseBanana.vss} then work? Raymond
  11. Bill, I'm glad you are up and running. Responses take a while, but they do come. If you put a shortcut to the C:\ directory, or any root volume, in your VW folder, you will then be able to $INCLUDE any file by using the complete pathname to that file. In this way, you will only need 1 shortcut per Disk Volume, instead of 1 shortcut for each project directory you are using, which will keep your VW directory much less cluttered over time. Raymond
  12. Hi Bill, I just loaded VW 11.5 on my Mac and noticed there is a difference between it and VW 10.5. Where I could open any file on any hard drive with the $INCLUDE statement in v10.5, I cannot in v11.5. Since I am developing PlugIns for 2 platforms and have many files to include, I have opted to have a single directory for development outside the application folder, rather than work out of the Plug-Ins folder. In v10.5, VW on both platforms can link these files onto a PIO with a single $INCLUDE and all subsequent $INCLUDE files can be called from the main file. Perhaps it can be done in v11, but I haven't figured out how. SO?, I did the next best thing I could think of. I put an Alias/Shortcut for the hard drive into the Plug-Ins folder. I haven't tried in on the Windows side yet, since I only have v10.5 on the PC, but it works nicely on the Mac. This seems to be an acceptable work around for me. Give it a try and tell me if it works for you. Raymond
  13. JC, If you have more than one object selected, the first one (meaning the one in the back) will have its colors displayed in the Attributes Palette. Make sure you only have one object selected. The OIP will indicate how many objects are selected in the upper left hand corner. What Transfer Mode do you have selected? That menu is in the Layers dialog box. Set it to "Paint" and check your colors again. If you're still having problems, tell us more and we'll go from there. Good luck, Raymond
  14. Mike, Be careful what you ask for... I can see where this would help you for the need you described, but where would you have the text placed? Exactly the same position, or would it move with the rotation? Are you going to want to adjust its position as a function of rotation? The same goes for flipped symbols, does the position of the text flip from one side to the other when the symbol is flipped, or do you want it on the same side, or do you want to choose? Lastly, how would you want to control which text behaves this way and which text stays registered with the symbol? I use text as part of symbols all the time and I need it to stay put, so at the very least, I hope you are asking for OPTIONAL control. The level of control you are asking for would make text objects very difficult to manage in symbols, especially for the novice user. I would suggest using the Group method previously discussed or having 4 symbols tweaked for your needs as you are already doing. If you go this route a lot, it would be a good place to employ a vectorscript to generate the extra three rotations of a symbol based on the one you create, each with a slightly different name. Or, develop a PIO that contains a user selectable symbol and a text block and adjusts the text accordingly as Zeibin's above script allows. I don't mean to rain on your parade, but I think there are many solutions already available to achieve what you need. If you'd like to discuss any options further, either here or off line, I would be more than willing to assist you. Good luck, Raymond
  15. Bill, You should be able to specify any file name that you have access to when the script is run. I have even included files across a Mac/PC network during debug, so I know it will work. Before checking the spelling of your file name, put a blank between the .vss and the "}". {$include d:\TestInclude.vss } I am not sure if this is necessary, but I remember trying it once. Then, if that doesn't work, put a blank character after SelectAll; or put a blank line after SelectAll; in your included file. I think one of these suggestions will work (probably the last one). Let us know what you find. Raymond
  16. Although not so critical today as it was 20 some years ago, back when computer memory and clock cycles were at an unholy premium, everything was designed to conserve space and run faster. OK, it's still true, but we're much more spoiled now. The short of it is Rectangles take less memory to store then polygons. Like Lines, Rects only require two points to define, an UpperLeft and a LowerRight. PolyRects (my pseudo term) require four points. Yes, they are more flexible conceptually that Rects, but in the '80s and '90s, they were too expensive to consider replacing simple Rects. Another not so obvious feature of Rects is their redraw speed versus other polygonal shapes. Graphics engines (the chips and software on video cards, and the like) have primitives for drawing lines and rectangles that are much faster than those used to draw other shapes. A program that was written to use Rects efficiently ran and refreshed the screen faster. It's still true today. Don't knock them, they really are useful, even if you don't see it directly. Raymond
  17. I am confused by your comment. Are you referring to the VectorScript Language Guide? I copied the following from the end of Section 9, and pasted it here. It worked using Acrobat 4 and Acrobat Reader 5. What viewer are you using? Please elaborate. Raymond code: Procedure HandleEvents( VAR item : LONGINT; data : LONGINT); Begin case item of SetupDialogC: Begin InsertChoice( kPullDown, 0, 'choice 0'); InsertChoice( kPullDown, 1, 'choice 1'); End; kCancelButton: Begin End; kOKButton: Begin End; End; End;[/code]
  18. Ken, Perhaps I may be of assistance. I have written a Gerber translator for myself and would be happy to try to translate your file for you. I am able to translate Polylines with Corner, Arc and Bezier control points (CPs), but not Cubic Spline CPs. My output is in RS-274X format. There are some drawing restrictions in VW, but if your file is simple enough, it should go smoothly. If you wish, you can send me your file, and/or contact me at mullinrj@aol.com. All the best, Raymond
  19. Hi dirlep, Use the Num2Str() function. Your last line in the loop would look like this, for 1 decimal of display. CreateText(Concat(' ', vertexNum, ' / X: ', Num2Str(1, X), ' / Y: ', Num2Str(1, Y))); Raymond
  20. Here's something scary!!! I copied the script as posted to a new VS. I added the Run(makesin) and ran it to see the error message. THE SCRIPT RAN!!! The extra right parenthesis in the FOR statement did not kick an error!?! Any takers as to why? Raymond VW 10.5.0, Mac G4 OS-10.2.8
  21. Peter, I use Internet Explorer for the VSFRef, just because it defaults to it. I am also on a Mac. OK, I tried it in Netscape and typing a letter did NOT take me to a command starting with that letter. Score 1 for IE. Yes, I agree, not all commands are logically named. And the SEE ALSO: part of the VSFRef is anemic. Two functions you will use a lot, GetObject() and GetName(). They are opposites of each other and will get you handles or names when there seems to be no other way. They are also not referenced as much as they should be in the VSFRef. It will take a lot of time browsing the VSFRef to get familiar with it, but the more you write, the easier it will get. Keep a copy of every script you write in one place so you can reference working code quickly. Also, collect posted code in another folder for quick reference. Both will help you generate scripts faster. When you know a function exists and can't seem to locate it, don't wast time reading the whole manual, post a quick question to the VSList (have you subscribed?) and you will get very fast answers from around the globe. By FIND string, I mean the FIND command (Cmd-F). In IE, it will search the left and right windows for matches. I can't say for Safari. HTH, and happy scripting, Raymond VW 10.5, OSX 10.2.8 on a SLOW G4 Dual 500 (Actually, it's fast enough for me)
  22. If you click in the left pane, where all the procedure names are listed, you can type the first few letters of the function name you want and it will take you there. FIND string works for the list of procedure names and the currently open page. Another way to view the data is to list the procedures by class (top left pane, second option). It shows you most of the relevant functions grouped together. HTH, Raymond
  23. Chris, I am going to take this to an extreme, but if NNA put every "good idea" in the main program, what would be the incentive for people to write add-ons? Are you in favor of NNA providing an Industry Series package for everything? VW has an incredible array of tools to customize the program to your heart's content. If you don't want to write your own, you can shop for the ones you like. If what you want is not out there, ask. Chances are a developer will find a way to offer what you want. Don't forget to pay him/her for the effort. If it makes your life easier, it has value. Third party software makes VW phenomenally stronger than NNA ever will. NNA does a great job with the foundation. I think it best if they continue in that vein. Support your local developer! Raymond [ 03-10-2005, 02:46 PM: Message edited by: MullinRJ ]
×
×
  • Create New...