Jump to content

MullinRJ

Member
  • Posts

    2,007
  • Joined

  • Last visited

Everything posted by MullinRJ

  1. 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
  2. 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
  3. 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
  4. 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
  5. 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
  6. 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
  7. 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
  8. 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]
  9. 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
  10. 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
  11. 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
  12. 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)
  13. 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
  14. 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 ]
  15. GJ, Is the object in the symbol a text object? I ran your script and got no errors changing a text object inside a symbol. VW 10.5.0 on MAC OS 10.2.8. To see the changes to the symbol in your drawing you will have to put a RedrawAll; after the SetText(); command. Even without the RedrawAll;, the printed output showed the updated date. quote: but I get all kinds of errors in when I try to add it to editing a specific symbol definition.Since named objects are unique, you don't have to edit the symbol definition to modify the DATE string inside, just run the code you have above. There will only be ONE object in your file named DATE, and even if it is in a Symbol Definition, GetObject('DATE') will return a handle to it. Can you list the errors you are getting, or the symptoms? Maybe I don't understand exactly what you are doing, so it will help clarify things. Raymond
  16. Andrew, Here is a one line VS command that will let you toggle the Zoom Line Thickness preference: SetPref(9, not GetPref(9)); Create a script in a script palette with this, or goto www.vectordepot.com/plugins1.shtml and look for Toggle Lineweight Zooming (more than halfway down). You can add this to your plugins folder, then add it to your workspace (it's a menu command and you should find it under Miscellaneous) and assign a keyboard shortcut to your new menu command. You can then toggle the preference on and off at will. Now your new program will be Turbo Charged. All the best, Raymond
  17. Hi Kiwi, Nice script, thanks. I think you need one change in the loop where you save the handles. You have: FOR i:=1 TO j DO BEGIN {this keep on memory the objects handle} MyH:=h; h:=NextObj(h); END; I think "h:=NextObj(h);" should be "h:=NextSObj(h);", so it just saves the handles of selected objects. All the best, Raymond
  18. It looks like you are doing this in a PIO. If so, use: BoolResult := GetCustomObjectInfo(objectName, objectHand, recordHand, wallHand); to return a handle to thePIO you are creating. I think myHnd:=FIn3D(objectHand); should return a handle to the first object you created (as numbered below). rect(0,carc_d,19mm,0); { 1 } rect(carc_w-19mm,carc_d,carc_w,0); { 2 } rect(0,0,carc_w,-20mm); { 3 } rect(19mm,carc_d-21mm,carc_w-19mm,carc_d-25mm); { 4 } Moveto(19mm,carc_d); line(carc_w-19mm,0); { 5 } Test myHnd before using it. if (myHnd<>nil) then begin end; Use myHnd:=NextObj(myHnd); to get the second object, etc. If you are in a normal script, use myHnd:=LNewObj; to return a handle to the last object you created (i.e., the line), and use myHnd:=PrevObj(myHnd); to get the second to the last object, etc. These suggestions are off the top of my head, so use with caution. Raymond
  19. Alan, Is your arm entirely on your work table? Though everyone has different preferences, I am not sure the weight of the mouse is the complete cause of wrist problems. As you know, there are many factors that contribute to fatigue during repetitive tasks. The added weight of a cordless mouse may be exacerbating a marginal problem that a lighter mouse allows you to ignore. I really cannot say without seeing your entire setup, so it may be exactly as you say - heavy mouse causes fatigue. I would also like to hear how your chair and table are configured. That was somewhat longwinded, sorry. I do have a point to make that I think many computer users overlook. Supporting the forearm on the table where the keyboard and mouse reside is key to relieving stress on the wrist. If the elbow is off the desk so that the edge of the desk presses into the forearm, it's only a matter of time before real pain sets in. Or if the elbow sits on the armrest of the chair, and that height is not the same as the desktop, pain. Very few computer tables I have seen are deep enough to lay your forearms entirely on the table (My Mom's is the worst with a slide-out keyboard drawer). With LCD monitors, it should now be possible to reassign desktop real estate, but if you are not already doing so, push the keyboard and mouse pad at least a foot into the table and I think a lot of stress will be relieved from the support. All the best, Raymond (love my Logitech cordless mouse) Mullin
  20. Hi Kiwi, I have done a lot with modeling Polylines using the parameters available in VS to recreate the curves. My downfall has been VW implementation of the cubic spline. Beziers and Arc control points are no problem, and CubicSpline control points surrounded by CornerPoints are also managable. However, I have trouble when there are a string of CubicSpline points in a row. I have requested technotes on the implementation of the various control points for Polylines from NNA in the appropriate techboard section, but never heard anything from them. I would be happy to compare notes with you. If you'd like to contact me, I can be reached at mullinrj at aol.com What you have pointed out is very interesting and I would also like to compare it to a math model in another environment. All the best, Raymond
  21. Hi Kiwi, Yes, it works for me. The new vertex appears between the first and second points in the POLY. I ran the following in VW 10.5 without problem. Of course, a Poly must be on the active layer and be the only, or at least the first, selected object. How are you passing the X and Y values? Are you passing them between procedures as I did below, or are you getting them from outside your program? Interactively? Or from a file? Try using the debugger or place a Message() statement in your program to see what the values of X & Y are. Raymond code: procedure xxxx; procedure ModPoly(H :Handle; X, Y :Real); Begin InsertVertex(H, X, Y, 2, 0, 0); End; BEGIN ModPoly(FSActLayer, 100, 100); END; Run(XXXX);[/code]
  22. Hi Pamela, There is also an example on the NNA website at http://www.nemetschek.net/support/custom/vscript/example.html that shows how to do what you want. It's the second from the bottom of the page (2-D Path Object). You may have to customize it for your needs, but that's half the fun. Good luck, Raymond
  23. SetTool(-241); { Pan Tool }
×
×
  • Create New...