Jump to content

MullinRJ

Member
  • Content Count

    1,277
  • Joined

  • Last visited

Everything posted by MullinRJ

  1. quote: does anybody use it by preference I do, though changing the preference default would not bother me, as long as I can set it the way I like. Raymond
  2. Hi Katie, Yes, I agree the Patterns Box does work properly. My concern is in changing a foreground color AFTER the Pattern Fill of solid foreground (FP=2, the third pattern box) is selected. By clicking in the Attributes Palette where it now shows the solid Foreground Color, a color palette pops up. Any color change will modify the Background Color and switch the Fill Pattern to (FP=1, the second pattern box). Reset the Fill to PATTERN to see the result of a color change. If I have set the Fill Pattern to Foreground and the color is Green, changing the color to Blue switches the Fill Pattern to Background (second box) and changes the Background Color, not the Foreground Color, even though I have previously set the Fill Pattern to Foreground Solid (third box). This doesn't seem right to me. The only way I can correctly edit the foreground color is to set the Fill Pattern to PATTERN, change the foreground color there, then re-set the Pattern to Solid Foreground Fill, even though it was already set to Solid Foreground Fill. This prevents VW from changing the Fill Pattern from Foreground to Background. It is a lot of extra clicking to do something that used to work nicely up through MC7. I apologize, I wax verbose again, but I AM more concise than last night. Thanks, Raymond
  3. Dear VectorMagicians, I just bit the bullet and upgraded to VW10.1 and noticed that something I wished had gone away, hadn't. Since VW8 evolved from MC7, the assignment of SOLID colors and fill patterns using the Attributes Palette has been causing me grief. When an object's Fill Pattern is set to SOLID, changing the color of the object can change its Fill Pattern. More specifically, when an object's Fill Pattern is set as solid FG color (FP=2), changing the color in the Attributes Palette also changes the Fill Pattern to solid BG color (FP=1). The opposite is true of the Pen Pattern, where changing solid Pen colors will change a Pen Pattern that had a solid BG pattern (PP=1) to a solid FG pattern (PP=2). The new color displays, but the Fill or Pen Pattern will have been changed. In my drawings, I go to great lengths to set the Fill Patterns, Pen Patterns, Fill Colors, and Pen Colors for every object. These are used as tags for later processing. There is a definite distinction between a solid Foreground Fill (FP=2) and a solid Background Fill (FP=1) when scripts are testing objects for these attributes. So, having the Fill Pattern attribute changed when it is not desired can have disasterous effects later in my design process. Try this. 1) Draw a Rectangle. 2) Set the Fill Pattern to PATTERN in the PopUp menu. Two color boxes appear in the Attributes Palette to the right of the Fill Preview box, the left color box is for the Foreground Color, the right one is for the Background Color. 3) Set the Foreground Color (left box) to Green, and the Background Color (right box) to Yellow. 4) Using the FILL PopUp menu, set the Fill Pattern to SOLID (The rectangle shows as Yellow - or BG Color. My intuition would have expected the FG color to display as it does with the Pen Pattern). Now, 5) Set the Fill Pattern to PATTERN again. 6) Clicking on the Fill Preview box and select the solid FG pattern (third box in from top left). The rectangle now shows as Green. 7) Click on the Green color in the Fill Preview box and change the color to Blue. The rectangle shows as Blue. Here's where the problem comes in. 8) Set the Fill Pattern to PATTERN again. Notice that the BG color was set to Blue and the FG color (Green) was unchanged. The rectangle's Fill Pattern was changed from (FP=2) to (FP=1) in the process. OUCH! What I wish for is the following: 1) If an object's fill is set to (FP=2), changing the object's color will change the FG color and leave the Fill Pattern and BG color alone. 2) If an object's fill is set to (FP=1), changing the object's color will change the BG color and leave the Fill Pattern FG color alone. 3) When an object is changed from a Patterned Fill to SOLID (via the PopUp Menu), the Fill Pattern should be set to (FP=2 or Foreground color). 4) When an object is changed from SOLID to a Patterned Fill (via the PopUp Menu), the Fill Pattern should be set to (FP=3, the first Patterned Fill). The same 4 behaviors should hold true for Pen Patterns as well. I can still force the Colors and Fill & Pen patterns to the way I need them, through many mouse clicks in the Attributes Palette, but it is very tedious to do what used to be very simple. I know you were trying to simplify the palette for the masses, but you have removed a great deal of control in the process. I wish I could have stated this more succinctly and I hope it is not too confusing. I would be more than happy to elaborate if need be. Please let me know if you consider the program's current behavior intentional. Thanks in advance, Raymond Mullin VW 10.1 - OSX.2.3 Mac G4 Dual 500
  4. MullinRJ

    Inserting Trademark Symbol

    I thought Trademark was ?, and ? is the Register symbol. What is the keystroke for the former? Thanks, Raymond
  5. MullinRJ

    2D Selection Behaviour

    BG, Though I can understand your example and your wish, I can see major problems in implementing it from NNA'a point of view. Symbols are efficient containers for having (potentially) lots of objects on the screen, without the overhead of really having those objects. Your request is not unreasonable, but it may require more computing horsepower than most of us have on our desks right now. Consider a symbol with 15 rectangles, circles or polygons, some filled, some not. Now consider having 200 or more of those symbols drawn on a page. To get the performance you desire, VW would need to treat each symbol as the multitude of objects it contains. Redraw times would skyrocket, and everyone would complain. Also, RAM requirements would be much, much higher. So, instead of dealing with 200 objects on the screen, VW would have to deal with 3000 objects. Not the best example, but I hope you can see what I'm getting at. In the simple case you describe, it does seem quite doable, but when taken to extremes, even simple things can be daunting. On another note, I have gotten used to selecting objects as VW has always done, and consider symbols as solid filled objects. At least that is how they react when being selected. My work habits have evolved around this feature, so I, for one, would not like to see it change, but that is just me. As with all modality changes that get implemented, I hope NNA sets them up with preferences, as I really dislike relearning a product I have happily lived with for more than 13 years. Raymond
  6. MullinRJ

    Rotated rectangles

    BG, A Rectangle object is defined by two points, upper left & lower right. The other two points are implied from the first two. This is achieved because the implied points fall on the orthogonal X-Y grid, so the left corner points and the right corner points have the same X values respectively. As well, the top corner points and the bottom corner points have the same Y values respectively. Rectangle drawing primitives, that only require two points to define the shape, are supplied in all OS program interfaces and draw to the screen very quickly. The same shape can be drawn as a Polygon, but to do so would require storing all four points individually, thus taking twice the data space for storage and drawing to the screen somewhat slower. Therefore, the Rectangle is more efficiently stored and drawn than a similarly shaped Polygon. Rotate the rectangle, and now all four points have different X & Y values, so a Polygon data structure must now be used, hence the Rectangle is transformed into a Polygon. Rotating it back does not perform the magic you would wish for, returning it to a Rectangle object. Its rectangleness is forever lost (unless you Undo the rotation). What you desire could be done if a Rectangle object also stored a rotation parameter, but that would require more data storage, and ultimately, slower redraw times. If you need to be able to edit rotated rectangles as you describe, you can program a RotRect object as a PIO, but that would undoubtedly add another layer of complexity to your drawing that you probably don't want. HTH, Raymond
  7. MullinRJ

    Lock Classes and Layers

    Selecting all objects in a layer/class and locking them would prevent deleting or moving things on that layer/class, but being able to lock a layer/class would also prevent ADDING anything to that layer/class inadvertently. It would also be very quick to toggle as well. Also, if locked and unlocked objects exist on a layer/class, locking the whole layer/class, would leave the object level locking intact. Unlocking the layer/class would return you to the same state you were in previously. I think this would be a very useful feature, and I'd like to see it added in the future. Raymond
  8. I would like to see first tool mode position be the tool default, and I would like to have the ability to set the order of the modes, even to exclude a mode I never use. I wouldn't mind if I had to use the Workspace Editor to set it up, but if I could actively drag the modes to a new position, and have the program remember the order, I would be very pleased. Raymond
  9. MullinRJ

    Convert mincad 6 to vectorworks 10

    Do you have VW 8.x? If you open it from version 8 and save it as v8, then v10 will be able to read it for you. If you don't have v8, and the file is not sensitive, send me the file and I will be happy to save as a v8 file and send it back to you. Raymond
  10. << 2) In the workspace editor, in vw 9.5, if a shortcut is already being used vw tells me which comand is using the shortcut. VW 10 does not do this. It just says the shortcut is unavailable. >> In the same vein, it would be nice if the WS Editor would also ask "Do you want to reassign the shortcut?" This would eliminate the need to manually remove it from the current command and return to assign it to the new command. Raymond
  11. MullinRJ

    jpgs in PIO

    There may be several ways, but I would place the image in a symbol, and place the symbol in your PIO. You can store your image/symbol in a template file that you use to create new documents so it is always in your document, or place it in a "library" file in your VW folder/directory, so you can have quick access to it when needed. HTH, Raymond [ 03-13-2003, 11:57 PM: Message edited by: MullinRJ ]
  12. MullinRJ

    System clock?

    Am I running a day ahead of this board, or is the clock lagging again? Please check the clock setting. Thanks, Raymond
  13. MullinRJ

    Entering colors

    Hi Chris, First, Copy the script to a text file (cut & paste) and save it to your disk for safe keeping. With program still on you Clipboard, continue... In VW, Short version: 1) Open the Resources Window. 2) Click on the New... button. Choose VectorScript. 3) Name or choose your script palette. Name your script. 4) Paste your script in the window. Click OK. 5) Resize and position your new script palette. 6) Double click on the script name to use it. Long version: 1) Open the Resources Window. If no buttons are showing to the right side of the Resources window, click the "Grow Window" button on the upper right of the Resources window title bar. Eight buttons should be visible. 2) Click on the New... button to create a new script. Choose VectorScript from the list of radio buttons and click OK. 3) If you have no Script Palettes created yet (I assume you don't), VW will ask you to assign a name to one BEFORE the new script is created and named. Then another dialog box will appear asking you to name your new script. Confusing at first, but it gets easier with time. The next time you create a script (in this file) VW will already have a script palette created (you can have more than one) and VW will ask if you want to assign the script to one of the existing palettes or create a new one. Now you name your script and continue. 4) Paste the contents of the program in the script window and click OK. Your new Script palette will be on screen with the new script in it. 5 ) Close the Resources window. Resize and position you new script palette. 6) Select objects in your drawing to be modified and double click the script you just created. HTH, Raymond
  14. MullinRJ

    Entering colors

    The examples in my previous post were made using a document that was converted from an older MiniCad document. The numbers and colors cited were wrong for VW 8, 9 & 10. I have corrected the examples above to be consistent with the current VW color palettes. Raymond
  15. It sounds like you meant to change the Delta-Y value instead of the Y value. That will anchor the selected point and modify the object's size accordingly. [ 02-24-2003, 06:57 PM: Message edited by: MullinRJ ]
  16. It would make sense if the text position were an attribute of the symbol instance rather than the symbol definition.
  17. MullinRJ

    Entering colors

    To all interested, Here is a (simple? - it started out as simple) script that will assign colors by palette position to selected objects. To use the program, select the object(s) to modify. Launch the script. Enter a number for the palette position (0-255) and optionally enter the 2 character Palette Code. Since there are 4 color palettes, you have the option of specifying which palette to use - Pen Foreground (PF), Pen Background (PB), Fill Foreground (FF), & Fill Background (FB). I have arbitrarily chosen the Pen Foreground (PF) palette to be the default. Users may change the constant 'DefaultCPalette' to any other palette value (1-4) to suit their interests. When entering data, type the palette position number, in the range of 0-255, followed by the optional characters 'PF', 'PB', 'FF', or 'FB' for the four palettes respectively. Mis-typing a palette code will not cause an error, but will assign your color from the Default Palette. Use Undo to correct. Example : '5 FF' Sets the Fill Foreground color to YELLOW. Spaces are optional, and '5ff' will also work as entry is case insensitive. 'FF5' will also yield the same result. Unless the default constant is changed, 'PF' does not need to be typed for setting the Pen Foreground color as it is the default palette. So, '251pf' is the same as '251' and will set the Pen Foreground color to DARK BLUE. Note : Colors may (most likely will) vary if the Color Palettes are modified, or swapped out. Drawings converted from older versions (MC7 and earlier) will have the older palettes if they weren't updated, and the colors will be very different from the default palettes used in versions 8, 9 & 10. Any feedback on the use of this program is welcome. code: Procedure SetColorByNum; { Set the color of the selected objects by Color Palette position number. } { Copyright ?2003 - Raymond Mullin } { The dialog box is set up to take a string containing a number and optionally a Palette Code. } { The number is the color palette position in the range of 0-255. } { The Palette Code uses the following: } { PF = 1 = Pen Foreground Color Palette - This is default palette. } { PB = 2 = Pen Background Color Palette } { FF = 3 = Fill Foreground Color Palette } { FB = 4 = Fill Background Color Palette } { eg. 231ff - sets the Fill Foreground Color to palette postion 231 } CONST DefaultCPalette = 1; VAR H :Handle; DataGood :Boolean; I, Index, CPalette :Integer; R, G, B :Longint; S :String; Function FSObj :Handle; VAR LocHnd, H :Handle; Begin Locus(0, 0); LocHnd := LNewObj; H := GetParent(LocHnd); DelObject(LocHnd); case GetType(H) of 31: H := FSActLayer; { Layer } 11,16,24,34,38,71,83,84,95: begin H := FIn3D(H); if not Selected(H) then H := NextSObj(H); end; Otherwise H := nil; end; { case } FSObj := H; End; { FSObj } function Ch(S :String; I :Integer):Char; { Return a character from string S in position I. } Begin Ch := copy(S, I, 1); End; { Ch } BEGIN DataGood := False; repeat S := StrDialog('Palette Index (0-255) (PF-PenFore, PB-PenBack, FF-FillFore, FB-FillBack) = Optional', '0'); ClrMessage; UprString(S); CPalette := DefaultCPalette; if (Pos('PF',S)>0) then CPalette := 1 else if (Pos('PB',S)>0) then CPalette := 2 else if (Pos('FF',S)>0) then CPalette := 3 else if (Pos('FB',S)>0) then CPalette := 4; I := len(S); { strip end of string } while ((I>0) & ((ord(Ch(S,I))<ord('0')) | (ord(Ch(S,I))>ord('9')))) do I := I - 1; if (I<len(S)) then delete(S, I+1, len(S)-I); I := 1; { strip front of string } while ((I<len(S)) & ((ord(Ch(S,I))<ord('0')) | (ord(Ch(S,I))>ord('9')))) do I := I + 1; if (I>1) then delete(S, 1, I-1); Index := Str2Num(S); { Palette position } DataGood := (Index>-1) & (Index<256); if not (DataGood or DidCancel) then begin Sysbeep; if (not DataGood and not DidCancel) then Message('Index = ', Index,'. Out of range (0-255)'); end; until DataGood or DidCancel; if DataGood and not DidCancel then begin ColorIndexToRGB(Index, R, G, B); H := FSObj; while (H<>nil) do begin case CPalette of 1: SetPenFore(H, R, G, B); 2: SetPenBack(H, R, G, B); 3: SetFillFore(H, R, G, B); 4: SetFillBack(H, R, G, B); end; { case } H := NextSObj(H); end; { while } end; { if } END; Run(SetColorByNum);[/code] [ 02-25-2003, 03:16 AM: Message edited by: MullinRJ ]
  18. MullinRJ

    worksheet operation =round?

    Kristen, I just tried it in VW8.5.2 and ROUND only accepts 1 argument, but the documentation shows that it accepts 2. Probably an error in the documentation, or just wishful thinking. Try: =Round(123.456789*10^3)/10^3 to get 3 decimals of precision, where 10^3 is 10 raised to the 3rd power, or 1000. Change the 3 to whatever precision you desire. This should evaluate as: Round(123456.789)/1000 -> 123457/1000 -> 123.457 HTH, Raymond
  19. MullinRJ

    Working with vectors...

    Paolo, After overthinking the problem a bit, I finally realized it wasn't all that complicated. Here is my distilled version: code: function VecRot3D(V :Vector; RotX, RotY, RotZ :Real) :Vector; { Rotate a 3D vector by the amount specified in each axis. Rotation is in degrees. } { 14 February 2003 - Raymond Mullin } Var U :Vector; procedure PartialRot(var X, Y :Real; Ang :Real); var W : Vector; Begin W[1] := X; W[2] := Y; W[3] := 0; W := Ang2Vec(Vec2Ang(W)+Ang, Norm(W)); X := W[1]; Y := W[2]; End; { PartialRot } Begin U := V; PartialRot(U[2], U[3], RotX); PartialRot(U[3], U[1], RotY); PartialRot(U[1], U[2], RotZ); VecRot3D := U; End; { VecRot3D }[/code] Best wishes, Raymond
  20. MullinRJ

    measuring Area

    You may also have to stretch your palette down to see the info at the bottom. Raymond
  21. MullinRJ

    Working with vectors...

    Paolo, Can you describe how you want your function to work? In my limited understanding of 3D vector math, I do know that the order of rotations affects the orientation of the result. For example, rotate X 90?, rotate Y 90?, rotate Z 90? yields a different result than, rotate Y 90?, rotate Z 90?, rotate X 90?. In the case of the VS command, Rotate3D, the axes are rotated in XYZ order. Raymond
  22. MullinRJ

    How to select a existing HATCH within VScript?

    ccroft, You are correct. UpStr is used to make the data case insensitive by converting all the strings to uppercase before they are compared. I put it in because I like to use functions over procedures for routines that return only one variable. If I had used the plain vanilla VS procedure UprString, I would have had to write the following 3 lines inside the while loop: TmpName := VectorFillList(I); UprString(TmpName); Match := TmpName = VFName; For readability, I like code on one line, so I wrote UpStr to be able to write the following: Match := UpStr(VectorFillList(I)) = VFName; which sets Match to TRUE if the hatch name in the list equals the hatch name passed to the function GetVectorFillIndex. The procedure UprString needs a variable passed to it, so VectorFillList(I) must first be assigned to a variable, which can then be passed to UprString, where it gets modified, returned, and subsequently used in a boolean comparison. Granted, UpStr does not save a lot of room in this program, but I will use it elsewhere then the need arises. This has been a very interesting topic. I have not followed it closely, but when I get a little free time I intend to come back and pick through all the code. Thanks to all for writing. Raymond
  23. MullinRJ

    How to select a existing HATCH within VScript?

    Alexandre, I have run into the missing Get/Set statement often in the past. Sometimes however, there are enough statements available to script the missing code. You are lucky today. Here is a short function that will get the index number from the hatch name. The function returns 0 (zero) if the hatch name is not found, and the hatch name is case insensitive. Best wishes, Raymond code: function GetVectorFillIndex(VFName :String) :Longint; { Return a VectorFill index # from a VectorFill name. } { Raymond Mullin - 6 February 2003 } Var Done, Match :Boolean; I, VFCnt :Longint; function UpStr(S :String) :String; { An upper string FUNCTION. } Begin UprString(S); UpStr := S; End; { UpStr } Begin VFCnt := NumVectorFills; UprString(VFName); I := 0; Match := False; Done := VFCnt = 0; while not Done do begin I := I + 1; Match := UpStr(VectorFillList(I)) = VFName; Done := Match | (I = VFCnt); end; if not Match then I := 0; GetVectorFillIndex := I; End; { GetVectorFillIndex } Example: Var VFIndexNum :Longint; HatchName :String; ... HatchName := 'any Hatch Name'; VFIndexNum := GetVectorFillIndex(HatchName); [/code]
  24. Does anybody use the Extend Tool to extend arcs or polys to boundary objects, or is the majority of its use for snapping lines to boundaries? Raymond
  25. MullinRJ

    Setting position of object

    Your guess is correct, move the difference. If you haven't already written one, here's a short procedure I've used before for Set3DCntr. HTH, Raymond Procedure Set3DCntr(H :Handle; x, y, z :Real); { Set the 3D center point of the object referenced by handle "H", to the coordinates specified by "x", "y" & "z" } Var u, v, w :Real; Begin Get3DCntr(H, u, v, w); Move3DObj(H, x-u, y-v, z-w); End;

 

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.

×