Jump to content

MullinRJ

Member
  • Content Count

    1,307
  • Joined

  • Last visited

Everything posted by MullinRJ

  1. Ionw, I hate to burst your bubble, but Option-Click and Option-Drag for creating duplicates have been around for a long time. They also work on multiply selected objects. After selecting a group of objects, Option-Click or Option-Drag on any one of them and the group is duplicated. The only down side I can think of is that this feature can confuse someone who is not used to using it. I use Option-Drag in conjunction with the Duplicate shortcut (Cmd-D or Alt-D). After duplicating and offsetting the first object, press Cmd-D to repeat the process N times. It's a quick way to duplicate an array of objects. This works until you click elsewhere and then Cmd-D reverts to its default mode. Happy cloning, Raymond
  2. If you keep this up, I'll end up telling you all my secrets... Best wishes, Raymond Procedure GetObjsFromLayer(Lair :String); { Copies all objects from layer LAIR to the active layer. } { Use Cut command if you want to move objects instead. } Var LName :String; Begin LName := GetLName(ActLayer); Layer(Lair); SelectAll; DoMenuTextByName('Copy', 0); Layer(LName); DoMenuTextByName('Paste In Place', 0); End; { GetObjsFromLayer } GetObjsFromLayer{'aLayerName'); { Calling Syntax }
  3. I'm not sure if there are any differences when accessing files from Plug-Ins, but here is a script that will read and write prefs to a tab delimited text file. Sorry about the loss of indentation, it is a victim of this BB. HTH, Raymond Procedure SaveToFile; { Read variables from file. Save new variables if they change. This example saves 2 Reals and an Integer to a tab delimited text file. } CONST FileName = 'RAM Disk:Defaults'; Tb = chr(9); { TAB character } VAR SaveDefaults :Boolean; Int, SavedInt :Integer; X, Y, SavedX, SavedY :Real; Function GetDefaults :Boolean; { Get defaults from file or create them if file does not exist. In VW8.5.2 (Mac), a Caution Dialog appears when the Pref file does not exit, but a new file is created anyway. Clear the dialog and continue. } VAR B :Boolean; Begin Open(FileName); if (GetLastFileErr=0) & not EOF(FileName) then begin Readln(SavedX, SavedY, SavedInt); B := False; end else begin { Initialize defaults if Pref file does not exist } SavedX := 6.5; SavedY := 3.8; SavedInt := 3; B := True; end; Close(FileName); GetDefaults := B; { Will force Pref file to be saved when true } End; { End GetDefaults } Procedure SetDefaults; { Rewrite the Pref file with new values. } Begin Rewrite(FileName); Writeln(X:6:3, Tb, Y:6:3, Tb, Int:1); Close(FileName); End; { End SetDefaults } BEGIN SaveDefaults := GetDefaults; { Read in saved variables } PtDialog('Enter a coordinate. Values must fit on drawing.', num2str(3, SavedX), num2str(3, SavedY), X, Y); if not DidCancel then begin Int := IntDialog('Enter an integer value:', num2str(0, SavedInt)); if not DidCancel then if SaveDefaults | (X<>SavedX) | (Y<>SavedY) | (Int<>SavedInt) then begin { Save prefs and BEEP } SetDefaults; SysBeep; end; end; END; { End SaveToFile } Run(SaveToFile);
  4. If turning off the hatch cured the symptoms, I wouldn't even think of suggesting you poke around with the fonts. Raymond
  5. Joe, Welcome back from spectre land. Here's another shot in the dark. Do you think it may be font related? Do you have differences in the fonts on the two platforms? It's funny you reappeared today. The hyperlinks are changing color on the BB when they are read where they never changed before. It makes it a lot easier to read now. Best wishes, Raymond
  6. Joe, Have you sent the file to any friend(s) and let them try it on their system? If the problem is in the file, it should cause problems on another system, but if the problem is on your computer, the file should open elsewhere. If you would like, I could try it on my machine for you. I am very unbusy right now and can offer you a good bit of my time. I am also running VW 8.5.2 on a G4/500 MHz DP, OS 9.0.4 with 1GB RAM. Good luck, Raymond
  7. This has come up several times before. Though there is no direct way to query VS for the Locked attribute, you can use the following function to get the answer. The concept is, if it moves, it's unlocked. Function IsLocked(Hnd: Handle) :Boolean; { Determine LOCKED? by moving object, if it does not move it is locked. } VAR x1, y1, x2, y2, x3, y3 :Real; Begin GetBBox(Hnd, x1, y1, x2, y2); { Get position in (X1, Y1) } HMove(Hnd, 1, 0); { try to move it } GetBBox(Hnd, x2, y2, x3, y3); { Get new position in (X2, Y2) } HMove(Hnd, -1, 0); { if it moved, move it back } IsLocked := x1 = x2; End; { End IsLocked } HTH, Raymond
  8. How many points are in your single segment polylines? 2? I tried creating a 3 point Polyline and deleting the middle point. It worked, and it still stayed a Polyline with 2 points. How goes it in your PIO? Raymond
  9. If all the points between BeginPoly and EndPoly are created with LineTo, then the object type will default to Polygon (but you already know this). Try adding a dummy CurveTo point as your second point and then delete it immediately after you issue the EndPoly. The type will stay as a PolyLine. I tried adding a Dummy Point as the last point, but deleting it closed the Poly, which may, or may not affect your routine. Also, if you add it as the second point, you always know where it is and can delete it without having to calculate the size of the Poly. Here's a simple example that leaves the type as PolyLine. I tried it as a stand alone script in 8.5.2, but not as a PIO, and it worked. It should still work in 9.5. BeginPoly;MoveTo(-1.2, 1.9);CurveTo(0, 0); { Dummy point }LineTo(1.9, 1);LineTo(0.1, -0.8);LineTo(0.8, -1);LineTo(3.6, 1.4);EndPoly;DelVertex(LObject, 2); HTH,Raymond
  10. He may have, but he was using a PI substitute (22/7 = 3.142857...), so his area calculations will a tad large. Raymond
  11. Hi Petri,I have a question about your previous remark: << Just remember: VW ovals are not true ellipses. >> Would you please explain what you mean? To the best of my ability to determine the shape, the OVAL (full, not arc segment) seems to conform quite well to a mathematically generated ellipse. TIA,Raymond
  12. As I have stated previously, I am not a Window expert, but could the class Window-Main refer to the conatiner that holds the window parts, where each part in the container is in a different class? That way, when you only display the class Window-Main, the internal objects do not display, because the are in different classes. I am just guessing, but if it's true, it might explain what you describe. You can use the Custom Visibility menu to display objects in multiple levels of classes, or run a short script like the following: Hide(ALL);Show((C='Window-Main')|(C='aSubClass')); There are probably other ways to do this too. Best wishes,Raymond
  13. << Can't figure out what I might have done to turn these windows opaque. Ideas? >> Wash them? Sorry, I don't really know the answer, wish I did. Raymond
  14. You can do it with one line of code: SetPref(9, not GetPref(9)); This sets the preference to the opposite of its current state. I place it in a script palette with the name ZLT (for Zero Line Thickness), but you can do as IONW suggests, <<Make it a plugin and add it to your work space and assign it a keystroke. >> This can be done with any of the boolean preferences. You just need the number of the pref which you cn get from the Appendix of the VS Function Reference. HTH,Raymond PS - Pref 10 that IONW mentions is for toggling B&W display. [ 08-30-2002: Message edited by: MullinRJ ]
  15. Kevin,You are right, circuit board design is primarily done in other software packages. However, at the time I started doing designs, all the other circuit board packages could not comprehend the geometries I needed (circular arrays). MiniCad, because of it's mechanical capabilities, scripting language and price was perfect for my needs. Only the square pen feature made it a little more difficult to use, but I developed ways around that. VW still has more flexibility than any other package I have seen, and I have 12 years of tools developed that make designs easy to manage. Chip design and PC board design are light years apart. You are right, the big silicon houses do not use VW for IC design. Board design is another issue and well within the capabilities of VW. Actually, I have been able to do things in MC/VW for over a decade that only recently have been done in other packages. I have made the right choice for software packages, and whether or not the line weight and square pen issues are addressed, I will continue to VW for my design work. <<If I need to draw a thick circle, then I would draw a solid circle and do a "clip surface with another circle.>> Using the knockout feature is nice, but it does not print correctly for me on all the machines I use; whereas, concentric circles always work. Katie, I too wish to offer my thanks for a job well done - both, by the entire VW team and especially to the tech support people that answer this board. I, for one, usually only write when there is a problem. Frustration can sometimes sharpen my words, but it never lasts (the frustration, that is). If I have sounded off too harshly in the past, I apologize. I may disagree with various points of view, but I still appreciate the work you do. Mostly, I wish to say thank you. Thank you all. Best wishes,Raymond Mullin [ 08-30-2002: Message edited by: MullinRJ ]
  16. I, too, agree with Dan. Trying to do something simple like scaling a layer should not require a multitude of edits to preserve the finished look of a drawing. However, the problem is not easily remedied by allowing lineweights to be scaled. One key point that has so far been omitted in this thread is the inherent technological limit of available lineweights. From the beginning of the software as MiniCad, there have only been 256 available lineweights (0-255 mils). Even the metric weights are rounded off to the nearest mil in this range. (You can see this if you dump a metric drawing to a VectorScript text file and search for the PenSize command. The units are always in mils.) It's nice from the programmer's standpoint to have such a concise data structure to manipulate, but it severely limits the software from a draftsman's point of view. Lineweights over 127 mils cannot be doubled accurately, and forget about tripling or quadrupling the scale. The widths will clip at 255 mils. On the other end, small lineweights cannot be drawn below 1 mil. If an object is scaled multiple times, up or down, where lineweight clipping occurs, all relationships to the original lineweights are lost. From a drafting perspective, consider having to draw circles with varying weights. Circles up to 255 mil lineweights can be drawn with one circle. But if one circle needs to be drawn with a 0.5" line thickness, two concentric circles of 0.25" need to be drawn, and their respective radii must be calculated and adjusted accordingly. Not the hardest of tasks, but it's a real time waster. I've had to do it, and it ain't fun. Don't even think about scaling this up. As a circuit board designer, lineweights are critical to doing exacting high tech work. Unfortunately, this software does not allow me to be as picky as I'd like. To get finished trace widths precisely etched in copper, it is necessary to plot lines 0.5 - 1.5 mils over the required finished copper trace width. The smaller the finished linewidth, the more critical this oversizing becomes. I can force the finished linewidths to the values I need to control my plots, but not inside VW. It requires an edit after the file is exported. Katie, as to your comment << A lineweight is an attribute assigned to an object. Scaling an object has no relation to it's attributes such as line weight. >>, I could not disagree more. Although this is currently true with VW, it is not the way most draftsmen think. To cite a parallel that does exist in Vectorworks, the Scale Objects... menu allows you to scale, or not scale, associated text when scaling selected objects. Text is an attribute to an object, yet you let us choose whether or not to scale it. Why not lineweights? This "feature", like the square drawing pen*, really needs to be updated to make VW an exemplary CAD package. Raymond Mullin * Square drawing pen - Sorry, I couldn't resist bringing it up again. This QuickDraw hand-me-down should be abandoned. It's hard to do precise work when the screen image is not what prints, and in some cases, is what prints but shouldn't.
  17. Dan,Sorry, I don't know the answer to that. Based on the nature of the offset commands you were inquiring about, I would be surprised if they did not work. The VectorScript required for those functions is not that difficult (basic math functions) and those functions used should work under all environments. As to the rest of the package, I don't know. Each tool is a separate piece of code, so one could break without affecting the rest, but the odds are they all will work. If there would be any problem, Julian will work with you to fix it. I have dealt with him in the past and you won't find a better person to do business with. HTH,Raymond
  18. OK Dan, I see what you mean. What you are looking for can, and has been done in VectorScript. Julian Carr has written a suite of tools (more than 40) that enhance the functionality of VW. There are four Offset and Array tools that I believe do what you are looking for. Check out his site at Julian Carr Design, then choose the link to OzCad VW Pro (it's across the top). You can view the manual in PDF to see if it interests you. HTH, Raymond
  19. VectorScripts could be SO much more flexible if there were commands that could sense the modifier keys at the exact time the VS command is executed. The existing SHIFT, COMMAND, OPTION & CAPSLOCK commands only sense modifier keys at the last user event. Your tools have this capability. I want my tools to have the same ability. Thanks,Raymond Mullin
  20. Hi Dan,You can use the Move command for simple translation (X, Y) or (r, Theta). The Offset tool is better used for making concentric duplicates. Select all the objects you want to offset, then Option-Click (Mac keyboard) on one of the selected objects to make your duplicates. Option-Clicking on a selection will duplicate that selection in place. Then use the Move command under the Tool menu and type your distance in the dialog box. The Move command shortcut on the Mac is Cmd-M. The appropriate Windows shortcut will be listed on the menu. Ctl-M, I think, I never remember which. Also, Option-Clicking on an unselected object will duplicate just that object. It takes a little practice since there is no obvious feedback that a duplication has taken place, but it's quick, easy, and fairly intuitive. When in doubt, UNDO. If you just want to move the original objects, then Cmd-M, & Enter. It remembers the last offset entered. Another fun shortcut, if you Option-Click on an object and then drag the duplicate into position, then by hitting Cmd-D (duplicate) N times, you will get N more duplicates, each offset the same amount as the first one. This is a quick and dirty Duplicate Array method. HTH, Raymond
  21. MullinRJ

    Fonts

    PostScript fonts display just fine on a Mac - with a little help from Adobe's ATM. I have been using PostScript fonts with TrueType fonts for years without a problem. Although I have replaced many PS fonts with TT ones (as new OS's ship with TT's now), I still have dozens of PS fonts active. I cannot tell any difference by what I see on the screen or the printed page (PostScript printer) as to which font type was used. ATM? Deluxe is what I am using now on OS 9. I am not sure what is available for OSX yet.
  22. No disrespect intended, but I think that would depend on the level of understanding of the tinkerer. I have never had trouble using ResEdit. It's a great tool and I don't know where I'd be without it. Raymond [ 08-19-2002: Message edited by: MullinRJ ]
  23. MullinRJ

    GetPtL

    What happens if you hold the SHIFT key down while using GetPtL? (a shot in the dark question) Raymond
  24. MullinRJ

    GetPtL

    Sometimes my angle snap prefs mysteriously get unselected, don't know why, but they do. Double hit the "S" key to open the Angle Snap preferences, or you can double click on the constrain angle button in the Constraint Palette. Make sure the 30,60 and the 45 check boxes are checked. Repeat procedure as often as necessary if the program "forgets" again. Next, check that you are in Top/Plan View. My program loses the ability to snap to anything, angles and objects, at random intervals. I press CMD-5 and all is right with the world again (for a while). This may not solve your problem, but you'll need to check these things (if you haven't already) before you go on. HTH,Raymond [ 07-30-2002: Message edited by: MullinRJ ]
  25. Undo works just as well, too. I Cut, Copy & Paste in my script palettes by accident all the time. Undo is a life saver. Raymond

 

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...