Jump to content

MullinRJ

Member
  • Content Count

    1,277
  • Joined

  • Last visited

Everything posted by MullinRJ

  1. MullinRJ

    Procedure braces

    No, No!!! Don't take it out. Add a little more. It looks like some code came up missing, but enough was there to recreate it. Try this. When you really get motivated, this piece of code would make a nice PIO (Plug In Object). procedure braces;VAR x, y, x1, y1, x2, y2 :REAL; ymid, xmid, temp :REAL;BEGIN Getrect(x1, y1, x2, y2); {get the box} GetMouse(x, y); {will use this to determine which way the box was drawn} ymid := (y1+y2)/2; xmid := (x1+x2)/2; { I played with the code here. XYMID was undefined, that is where the garbling occurred. }{ Change the "<" to ">" in the next 2 if's and the braces will draw the other way. } if (y < ymid) then begin {box drawn top to bottom} temp := y1; y1 := y2; y2 := temp; end; if (x < xmid) then begin {box drawn right to left} temp := x1; x1 := x2; x2 := temp; end; if (abs(y2-y1) > abs(x2-x1)) then begin {box drawn taller than wide} beginpoly; moveto(x1, y1); curveto(xmid, y1); curveto(xmid, ymid); lineto(x2, ymid); curveto(xmid, ymid); curveto(xmid, y2); lineto(x1, y2); endpoly; end else begin {box drawn wider than tall} beginpoly; moveto(x1, y1); curveto(x1, ymid); curveto(xmid, ymid); lineto(xmid, y2); curveto(xmid, ymid); curveto(x2, ymid); lineto(x2, y1); endpoly; end; redrawall;END;run(braces);
  2. MullinRJ

    2D symbols not showing up?

    Does the problem you are describing only pertain to symbols you create, or also to VW supplied symbols as well? For symbols you create you will need a 2D AND a 3D part defined for it to show in both environments. Easy to check. From the Resource Palette, highlight your door symbol (single click). Press the Edit... button (top button on right). If no buttons are showing, click the grow window button in the Title Bar (second button in, on the upper right), and this will expand/contract the Resource window. When you click the Edit... button, you will get a dialog box for three selectable options: 2D Component, 3D Component, and Insertion Options. Both 2D AND 3D areas of the symbol need to be defined, so you will need to draw each and save each part for it to work in both views. Next, check the Insertion Options of your symbol and pick the Class it will be created under. Be careful, if you have this class's visibility turned off, you will place invisible symbols and get confused a lot. Choose, or create a class that you will normally leave visible when you draw. It is also possible to have the symbol instance in one class and the symbol parts in other classes. All parts will need to be visible to see the entire symbol. Are we having fun yet? There may be other reasons affecting the display of your symbols. If you are still having problems, write back. HTH,Raymond
  3. MullinRJ

    OI Palette - LINE

    Thank you NNA,That was very quick for wish number two. I just downloaded your VW Viewer and noticed the change. That will help a good bit, but granting the first wish will help a lot. Thanks again,Raymond
  4. Here are some for the interface guys. First, I constantly switch between Cartesian and Polar coordinates on the LINE display of the OIP. Given that just about every other object type takes up more room on the OIP, hence I already have a large palette, could you please display BOTH modes at the same time? There is plenty of room available. It's quite a time waster to toggle back and forth to see the other coordinate display. Second, If you can't grant the first wish, please consider this. The OI palette FORGETS the last LINE mode it was in when closed. It always opens to Cartesian display. This is very irritating when I want to work with Polar coordinates a lot. And no, leaving it open all the time is not a practical solution. The wasted screen real-estate is considerable. Thank you,Raymond
  5. MullinRJ

    how to SELECT with multiple marquees?

    A selection switch will keep me quiet - and happy. [ 07-03-2002: Message edited by: MullinRJ ]
  6. MullinRJ

    how to SELECT with multiple marquees?

    This is a becoming a really interesting topic. It has been my experience that the MAC standard has always reflected the modality of the VW9 selection mode. I just opened up a vintage reference, Inside Macintosh Volume 1 pp. I-39&40 entitled "Extending a Selection," and reconfirmed this suspicion. Re-marqueeing a selected object with the shift key depressed will deselect the object. In essence, it acts as a toggle. Even the Finder follows this modality, as does MacDraw, Freehand, Fontographer, Illustrator and a slew of other software packages. VW has a long-standing history of adding to, not toggling, the selection status of objects that encounter a Shift-Marquee event. I happen to like it the way it has been up through VW8. I am sure if the whole VW community were polled, you would find a fair number of people who support each selection mode. The solution seems quite simple, this should be a user selectable drawing feature, like the choice given for Click-Drag vs. Click-Click drawing modes. NNA, please do not change the way we (I) have worked over the last decade. By all means, add new drawing features to the program, but not at the expense of replacing well entrenched features some of us still desire. Raymond
  7. MullinRJ

    Omissions, always omissions

    It's almost 4 AM and I need to edit a series of Rounded Rectangles. I find the command GetRRDiam(), but where is SetRRDiam()? WHERE? How many GET commands still have missing SET commands? And vice versa? You have been 98% complete on your command set for over 10 years. When do we get 100%? The obvious stuff should be OBVIOUS! Not your happiest customer at the moment,Raymond
  8. MullinRJ

    Line Weights

    Katie,You are right about printing, but how about screen display? What you get on the printer is NOT what you see on the screen. With all the critical spacing and placement of lines required to make accurate drawings, it would be a big PLUS to see what we are really drawing. Consistency is king. Without it we are lost. Best wishes,Raymond
  9. MullinRJ

    Line Weights

    Does your plotter have an asymmetrical resolution? Such as 1200 X & 600 Y? That might be one reason you are seeing differences. <<Perhaps diagonal lines will reveal more whackiness.>> Yes, if and when you plot diagonal lines, more wackiness will ensue. Line weights will grow as the angle of the line approaches 45?, up to 41% thicker. It is because the boys at NNA use a SQUARE pen for their graphics, a throwback to QuickDraw on the Mac. For a CAD package that prides itself as an "advanced" drafting tool, they fail miserably on this issue. Freehand figured out how to draw with a ROUND pen nearly a decade ago, so I know it can be done, NNA just has to want to badly enough. Personally, I am surprised more people haven't griped about this all along. It is, in my opinion, VectorWorks weakest detail. Sorry NNA, I usually don't like to cast stones, but we have Super Computers on our desks and you still want us to use SQUARE pens?
  10. MullinRJ

    Just curiosity...

    Maybe we should be labeled Power Posters, instead. Or Voluminous Vociferators, or, ... I think I just justified my existence. Raymond
  11. MullinRJ

    Running around in... Ovals.

    Ts, When you mention p1 and p2, you are referring to parameters passed to the ARC command in VS. Yes, they would be the DIAMETER of the ARC especially if the ARC were swept through 360?. Compared to the OVAL or the RECT, it would be analogous to the bounding box of the drawn object. For short arc segments it may seem a bit odd to define such an EMPTY box, but, think of it any way you like, as awkward as it may seem, those are the numbers that the ARC command requires. I have seen much more obtuse ways of defining arcs: Gerber RS-274D & IPC D350 come immediately to mind. As a word of note, always use the upper left and the lower right coordinates of the bounding box, in that order, as the other combinations of corners definitely DON'T work. Been there, done that! HTH,Raymond
  12. MullinRJ

    Running around in... Ovals.

    As you know, there are 2 kinds of circles; the constrained Oval, and the 360? Arc. Which form do you want? It is easy to program a circular Oval in VS using the Center/Radius method, you just have to do a little math. If you have the Center point and the Second point, calculate the distance betwen both points, that is your Radius. Then fill in the blanks. Rad := Distance(Xcen, Ycen, Pt2X, Pt2Y);Oval(Xcen-Rad, Ycen+Rad, Xcen+Rad, Ycen-Rad); If that is not what you are looking for, then I do not understand your question. HTH,Raymond
  13. MullinRJ

    current object tool

    quote: Originally posted by bertb: Can someone help set the current tool, in addition to the function of setting current attributes, to the whatever object is picked after running the script? bertb,This is not hard either. Just add the following case statement after the PenBack command: ... PenBack(Red, Green, Blue); { Select Tool } case GetType(h) of 2: SetTool(-201); { Line } 3: SetTool(-203); { Rect } 4: SetTool(-205); { Oval } 5: SetTool(-207); { Poly } 6: SetTool(-202); { Arc } 8: SetTool(-220); { Freehand } 10: SetTool(-200); { Text } 12: SetTool(-227); { Quarter Arc } 13: SetTool(-217); { RRect } 15: SetTool(-209); { 2D Symbol } 17: SetTool(-221); { 2D Locus } 21: SetTool(-204); { PolyLine } { etc. } end; This list is not exhaustive, by any means. You may want more tools supported than the ones I have here. Embellish away. The Tool #'s and the Object Types are in the appendix of the VectorScript Function Reference which you should already have. If not, you really should download a copy. HTH,Raymond [ 06-14-2002: Message edited by: MullinRJ ]
  14. MullinRJ

    Text Vertical Align

    TS,There is no difference if you only have one line of text in your text block. With two or more lines in a text block, Top Baseline refers to the baseline of the top line of text, while Bottom Baseline refers to the baseline of the last line of text. Try the following to set the TVA if you are still using VW v8.5.2, which has the TVA attribute, but no way of manipulating it. Does version 9.5.x allow you to change it with a menu? I would hope so. If you want to set the TVA for all text objects in a file, including symbols and groups, go to VectorDepot for another script to do just that. It also works in 8.5.2, though it says it is for version 9. Procedure SetTxtVAlign;{ Change the TextVerticalAlign parameter of all selected text objects. } VAR TxtHnd: Handle; TA: Integer; x1, y1, x2, y2, x3, y3 :Real; BEGIN repeat TA := IntDialog('Text Vertical Align Option (1-5)', '2'); if not DidCancel and ((TA<1) or (TA>5)) then Message('Value out of range. Try again, or Cancel.'); until DidCancel or ((TA>0) and (TA<6)); ClrMessage; if not DidCancel then begin TxtHnd := FSActLayer; while (TxtHnd <> nil) do begin if (GetType(TxtHnd)=10) then { only process text objects } begin GetBBox(TxtHnd, x1, y1, x2, y2); { Save position in (X1, Y1) } SetTextVerticalAlign(TxtHnd, TA); { Text will move after this call } GetBBox(TxtHnd, x2, y2, x3, y3); { Get new position in (X2, Y2) } hMove(TxtHnd, x1-x2, y1-y2); { move text back to original position } end; { end if } TxtHnd := NextSObj(TxtHnd); end; { end while } SysBeep; end; { end if }END; { End SetTxtVAlign }Run(SetTxtVAlign);
  15. MullinRJ

    current object tool

    bertb,The first word 'INTEGER' was making your code inoperable. I took a few liberties and streamlined your code, and I also changed the comments a little. I hope this makes it readable to you. Most code is adapted from code that already works so your scripting talents will grow from practice. Have fun,Raymond Procedure COT;{ Make all the attributes of the selected object the active attributes }VAR X, Y :REAL; h :HANDLE; Red, Green, Blue :LONGINT;BEGIN GetPt(X, Y); h := PickObject(X, Y); IF (h <> NIL) THEN begin { Make H's layer & class active } Layer(GetLName(GetLayer(h))); NameClass(GetClass(h)); { Set Fill Pattern & Colors } FillPat(GetFPat(h)); GetFillFore(h, Red, Green, Blue); FillFore(Red, Green, Blue); GetFillBack(h, Red, Green, Blue); FillBack(Red, Green, Blue); { Set Pen's Size, Style & Colors } PenSize(GetLW(h)); PenPat(GetLS(h)); GetPenFore(h, Red, Green, Blue); PenFore(Red, Green, Blue); GetPenBack(h, Red, Green, Blue); PenBack(Red, Green, Blue); end;END;RUN(COT);
  16. MullinRJ

    current object tool

    bertb,The first word 'INTEGER' was making your code inoperable. I took a few liberties and streamlined your code, and I also changed the comments a little. I hope this makes it readable to you. Most code is adapted from code that already works so your scripting talents will grow from practice. Have fun,Raymond Procedure COT;{ Make all the attributes of the selected object the active attributes }VAR X, Y :REAL; h :HANDLE; Red, Green, Blue :LONGINT;BEGIN GetPt(X, Y); h := PickObject(X, Y); IF (h <> NIL) THEN begin { Make H's layer & class active } Layer(GetLName(GetLayer(h))); NameClass(GetClass(h)); { Set Fill Pattern & Colors } FillPat(GetFPat(h)); GetFillFore(h, Red, Green, Blue); FillFore(Red, Green, Blue); GetFillBack(h, Red, Green, Blue); FillBack(Red, Green, Blue); { Set Pen's Size, Style & Colors } PenSize(GetLW(h)); PenPat(GetLS(h)); GetPenFore(h, Red, Green, Blue); PenFore(Red, Green, Blue); GetPenBack(h, Red, Green, Blue); PenBack(Red, Green, Blue); end;END;RUN(COT);
  17. MullinRJ

    Variables in search criteria

    This question is to VW tech support: What is the TYPE definition of <CRITERIA>? [ 06-11-2002: Message edited by: MullinRJ ]
  18. MullinRJ

    flipped text irritation

    grantvz,Try this little script, it's fun. It works best for Center justified text, but it can easily be modified to change the justification as well. Raymond Procedure FlipText;{ Author : Raymond Mullin }{ Toggle the TextFlipped attribute for all selected Text objects on a layer. } VAR TxtHnd: Handle; B :Boolean; X, Y, Ang :Real; BEGIN TxtHnd := FSActLayer; while (TxtHnd <> nil) do begin if (GetType(TxtHnd)=10) then begin GetTextOrientation(TxtHnd, X, Y, Ang, B); SetTextOrientation(TxtHnd, X, Y, Ang-180, not B); end; TxtHnd := NextSObj(TxtHnd); end; { end while } SysBeep;END; { End FlipText }Run(FlipText);
  19. MullinRJ

    Stretching rounded rectangles

    On the issue of objects changing type when edited, the Reshape tool always changes a Rectangle to a Poly. It would be nice if a reshaped Rectangle retained its Rectangle identity when the Rectangle's shape remained Rectangular. The same could be said if a Rounded Rectangle is edited similarly, that is, the right or left sides moved in the X-axis only, and/or the top or bottom sides moved in the Y-axis only. In the case of a Rounded Rectangle having one vertex or one side moved in two axes, the type should change to Polyline and the corners/vertices set to ArcTo with the same radius as that of the Rounded Rectangle. Just a thought, but it would be nice. Raymond
  20. MullinRJ

    Stretching rounded rectangles

    Katie,I too use the Reshape tool for lines and rectangles, in addition to poly vertices. It is a great way to move parts of many objects at once, especially with the Move command. You cannot get the same behavior by dragging an endpoint of a line when multiple objects are selected. Not only do all the objects move, but they rescale too. It would be a natural extension of the tool to work on Rounded Rectangles. One pet peeve I have about the Reshape tool is that you cannot select or deselect lines or rectangles with the tool, only Polys. You must change tools to the 2D Select tool, make your selection changes, and then change back to the Reshape tool. Then you can edit Lines and Rectangles and Polys to your heart's content. Raymond
  21. MullinRJ

    Disappearing cues

    defjef,This is a long shot, but when it happens again, reset your view to Top/Plan, the first menu item under the View menu. For reasons unknown to me, sometimes my snap-to-object ability goes out the window. If I have the 2D selection tool enabled I may notice the 3D view icons on the data bar, but with other tools selected the lack of snap-to-objects is the only symptom. Why? I haven't a clue. I've noticed no pattern of when it happens. My workspace is set up entirely for 2D drawing. This never happened in MC6 or earlier, but it happens often enough in VW852, about once every day or so. I am on a Mac, so I am curious if the 'feature' is also on the PC. If this solves your problem, the solution is painless and easy. Reset your view and don't look back. HTH,Raymond
  22. I have two wishes for the Custom Selection process. 1) With objects already selected, I wish to refine that selection further by running 'Custom Selection...' on the current selection list only. Refinement should include deselecting objects that meet new criteria, or leaving selected only the objects that meet new criteria (which is the same as deselecting objects that don't meet new criteria). This might be easier for a user to implement than designing the PERFECT filter statement that executes in one click - especially at 4AM. 2) Have the 'Custom Selection...' dialog box REMEMBER the last selection, or the last N selections. Previous choices could be made available through a Pop-Up menu. Thank you,Raymond
  23. MullinRJ

    Help with hatching

    Brad,There is am Extend Tool that will extend objects you click on to a previously selected object, but it is manual. I know of no automated way to achieve your goal. It is possible to write a script to do it, but it would be tedious at best, and unless you are going to do this task repeatedly, you can do it manually in a lot less time. Just zoom in and walk your perimeter. Keep your Snap to Object constraint on, but be careful when editing groups of lines, if more than one line is selected, dragging a handle acts like resizing a group. This means that all the selected lines will move, so you have to resize lines one at a time. Editing polygon vertices is a lot easier, only the node(s) you intentionally drag move while the rest stay still. Another method to consider if your point count is not too overwhelming, retrace the outlines of your building with the polygon tool. You will be guaranteed that all vertices are closed. Use another color for the poly and you'll know when you've gotten all the walls retraced. Good luck and have fun,Raymond
  24. MullinRJ

    Help with hatching

    Hi Brad, Select the lines of one enclosed area, ungroup them if they are grouped, and use the 'Combine Into Surface...' command under the 'Tool' menu. You will get a paint bucket. Click anynwhere inside the lines with the paint bucket. You will get an additional Polygon object on top of your lines. Voila! You may now edit to you hearts content. if it doesn't work, make sure all your lines are touching end to end, or crossing. The path has to be perfectly closed for the tool to work. Use the 'Snap To Object' constraint when drawing or editing. Happy drawing,Raymond Mullin
  25. MullinRJ

    line equations

    Well, if you don't want elegant, here's a short script to plot a polynomial. You can edit the equation to your heart's content. Have fun,Raymond Procedure PlotFofX;CONST Interval = 50; StartX = -0.5; StopX = 2;VAR I :Integer; X, Y, Inc :Real; function FofX(X :Real):Real; Begin FofX := 2*X^3 - 5*X^2 + 2*x + 1; End; { FofX } BEGIN X := StartX; BeginPoly; MoveTo(X, FofX(X)); Inc := (StopX - StartX) / Interval; for I := 1 to Interval do begin X := X + Inc; Y := FofX(X); LineTo(X, Y); end; EndPoly;END;Run(PlotFofX);

 

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.

×