Jump to content

MullinRJ

Member
  • Posts

    2,007
  • Joined

  • Last visited

Everything posted by MullinRJ

  1. If you just want to duplicate the Rects around a circle, you can use the "Duplicate Array..." command in the EDIT menu. The third option is Circular Array and you can either click on the center of the circle to select the center of duplication, or type in the coordinates. To keep the Rects tangent to the circle, make sure the Rotate Duplicates checkbox is selected. HTH, Raymond
  2. quote: How can it be explained that the lines are thicker, even on screen!? It's on the screen because MiniCad/Vectorworks, continues to use Quickdraw (or a descendent thereof) to draw on the screen. Apple introduced QD in the 80's as an efficient way to draw PIXELS on the screen. QD uses a square pen instead of a round one, which can make lines up to 41% fatter when drawn on diagonals. Most professional programs (Freehand, Illustrator, Photoshop, et al.) have evolved beyond this. Printing to PS printers circumvents the problem by substituting PS code for the QD code. Non-PS printers, unless they are driven by a 3rd party PS RIP, still suffer from Square-Pen-itis. Until the programmers at NNA tackle this beast, you (we) will have to suffer this little bit of MiniCad that just won't grow up. Raymond PS - Pardon my rant, I've tried to limit this particular one to once a year now. There is not much I don't like about VW, but this one feature is pervasive. See ya' in 2005, but I hope not.
  3. Zaytsev, I believe that from all I've read and heard on this board, that it is not possible to have a selected tool perform an action without first clicking in the drawing. You could design your script as a Menu Command. Instead of placing it in a tool palette, place it as a menu item and assign a shortcut key to it to get something done without having to click in the drawing. Raymond
  4. Zaytsev, End your script with: RedrawAll; Also, don't forget to declare the variable "i" as an integer or longint. I got a compile error with your code. Other than that, it ran fine. Raymond
  5. Are you in Top/Plan view? Though I do nearly all my drawing in 2D, VW sometimes takes me out of Top/Plan. Resetting the view (Cmd-5 on a Mac) cures my snapping problems. HTH, Raymond
  6. If I may camp on to your wish, I would also like to be able to move multiple selected layers at the same time. Thanks
  7. Fred, Although the feature you want does not yet exist, you can get all your text into a class (or classes) with a script. I wrote a quick and dirty one to put all text objects in a document into a class. As written, it puts every text object in a drawing into the same class. You can modify the function 'SetClassOfTextObjs' to assign diffferent classes based on text attributes, or only modify text that is in the NONE class. I leave that up to you (or if you need help, just ask). HTH, Raymond code: procedure SetTextClass; { Author : R. Mullin } { Date : 4 December 2003 } { Assign a class to all Text objects in the drawing. } CONST TextClassName = 'TxtClass'; { assign your class name here } TextType = 10; function SetClassOfTextObjs(H:Handle):Boolean; Begin if (GetType(H)=TextType) then SetClass(H, TextClassName); End; { SetClassOfTextObjs } BEGIN ForEachObjectInList(SetClassOfTextObjs, 0, 2, FSymDef); { Text in symbols } ForEachObjectInLayer(SetClassOfTextObjs, 0, 2, 1); { All placed text objs, Deep, All layers } SysBeep; END; { SetTextClass } Run(SetTextClass);[/code]
  8. Giorgio, Are you drafting in 2D or 3D when the problem occurs? Are you in Top/Plan view? I draft mostly in 2D. Often, when I lose snapping to symbols or groups, resetting the view to Top/Plan fixes the problem. I am not sure why the view changes, but it does. The fix is quick, so I ignore the problem and go on. I am not sure it will help you, but it is easy to check. Best wishes, Raymond
  9. Try this short script. It will toggle all the classes, regardless of how many you have. The Class PopUp menu in the Data Display Bar does not update the little icons on the left properly, unless you open the Class... dialogue box and then close, but the script works. You can put the script in a script palette, or make it a Menu PIO and assign a shortcut key to it. I hope this is what you were asking for. Raymond code: Procedure ToggleClassVisibility; { Toggle the visibility of every class. Remember, the active class stays visible. 15 Oct 2003 - Raymond Mullin } VAR I, ClassCnt :LongInt; ClassName :String; BEGIN ClassCnt := ClassNum; I := 0; while (I<ClassCnt) do begin I := I + 1; ClassName := ClassList(I); case GetCVis(ClassName) of 0: HideClass(ClassName); { Visible } -1: ShowClass(ClassName); { Hidden } 2: begin end; { Grayed } end; { case } end; { while } END; Run(ToggleClassVisibility); [/code]
  10. Though you can't test for a lone modifier key being pressed from VS, you can test for a key repeat event. See the AutoKey function. There is a caveat, you need to press a key that will not do anythin inside VW, like select a tool, etc. I use the letter "B" in my workspace, which does nothing. If you use "B", you will need to isolate another key and use it for your scripting. Though I haven't tried checking the modifier flags at this time, it might work, if you should need more than one input flag at the start of a script. Good luck, Raymond
  11. kiwi, The "Guides" class is probably not showing because it was the last class created. You are exiting your repeat loops just before the last element is processed. Try changing the two UNTIL (a=n) statements to UNTIL (a>n). This will print all the classes. Best wishes, Raymond
  12. This took an hour more than it should have due to incorrect documentation and odd program behavior. The following script will set the precision for each angular dimension on the active layer as you wish. It falls short in its inability to update the dimension text on screen. I leave this as an exercise to the curious, or NNA's engineering staff. There is a fairly easy work around if all the DIM's are at the top level of the layer. After the script is run, all the angular dimensions are selected. Toggle one of the check boxes in the OIP (i.e. - Show Dim Value) and the screen will update. If your dimensions are inside groups, you will have to enter each group and toggle the OIP, sorry. I tried RedrawAll, moving the text and moving it back, turning it off and then on again, and a few other things I already forget. Without manually moving the text, or toggling an OIP switch, the DIM text does not reflect the VS change. Regarding the documentation, you must read Dimension ObjectVariable 20 as an integer (as documented), but it must be written as a LongInt. Do not read it as a LongInt, or you'll get garbage. It's workable, but confusing. Good night, and good luck, Raymond code: procedure SetDimDisplay; {Author : R. Mullin; Date : 25 September 2003 } { Sets the dimension precision for each angular DIM on the } { active layer and leaves all the angular DIM's selected. } CONST Precision = 1; { 1 = D, 2 = DM, 3 = DMS, 5 = 0.0, 6 = 0.00, 7 = 0.000, 8 = 0.0000 } function SetDimPrecision(H:Handle):Boolean; Begin if (GetType(H)=63) and (GetObjectVariableInt(H, 26)=5) then begin { 5 = Angular Dim } SetObjectVariableLongInt(H, 20, Precision); { 20 = Primary DIM Precision } SetSelect(H); { will leave dimension selected for manual update } end; End; { SetDimPrecision } BEGIN DSelectAll; ForEachObjectInLayer(SetDimPrecision, 1, 2, 0); { All objs, Deep, Active layer } SysBeep; END; Run(SetDimDisplay);[/code]
  13. quote: And why is this a 0-based index? If you have 1 peak and you pass 1 as the index, you get 0's as the peak. Pass 0 as the index and you get the correct peak. I thought Pascal was more 1-based than 0-based. As it pertains to arrays, Pascal is not based on either index. That bias is introduced by the programmer. An array can be declared with any integer as its base. Typical definitions are the ones you mentioned, such as: VAR PeaksArray : array [0 .. 8] of Real; or: PeaksArray : array [1 .. 9] of Real; but this is also valid: PeaksArray : array [-4 .. 4] of Real; The same applies to DynArrays, but the range is applied at runtime with the Allocate statement. There are other data types in Pascal that are 0 based, the SET data type for one, but I don't think VectorScript supports it. In all cases, the index range is not nearly as important as the documentation. HTH, Raymond
  14. brrt, To answer your first question, if you have just drawn the object and it is still selected, Open the Object Info Palette (OIP) and click on the Data Tab at the bottom. Above the record panes is a text field. Type your name in there. It may say *DEFAULTS* when you change tabs, or if the object already has a name its name will appear there, or it may be blank if the data pane is already selected when you open the OIP. It's not a well labeled field of the OIP, but that's where you find it. Someone better suited than I will have to address your second question. Raymond
  15. defjef, It is easy to assume the translation of one CAD format to another SHOULD be easy, especially if you are not a programmer. Understanding the nuances of such a task would make most men weep. ACAD and VW formats are not equal, and in many aspects, they are barely equivalent. Katie's points are right on the money. The DXF committee does limit the published file formats of ACAD. VW handles more ACAD features that it ever did, and I have every reason to expect that will continue. Now consider ACAD's position. They have the lion's share of the market. Every secret they give up can and will be used by others to usurp their customer base. If you were ACAD, would you share everything? It would seem logical that there is a way to "DECONSTRUCT" the file.. ie the output we see... and reconstruct it in the OTHER file format. I can appreciate your desire, but this is just wishful thinking. The task is not just monumental, it is also a moving target and subject to change. Without a key, which ACAD controls, programmers would just be guessing how things interact. As a parallel, if the Rosetta Stone had not been found, or written, I doubt we would have a sound understanding of Egyptian hieroglyphics. AutoDesk is the only one who can accurately describe their format. Be grateful we have what we do. Much of it works, and it improves with each VW revision. Much of it can be made to work with a firm understanding of what each program can and cannot do. Unfortunately, this may require that you also learn more about ACAD. Lastly, it never hurts to ask for more features. Best wishes in you endeavors, Raymond
  16. Try: J := ord(aCharacter); { returns the integer value of aCharacter } and Ch := chr(aNumber); { returns a character with integer value aNumber } or, the quick way to increment a char, Ch := chr(ord(Ch)+1); { Increments character Ch by 1 }
  17. Do you have VW 8.5.2? Most of the PIO's there are unlocked.
  18. When Snap-To-Objects stops working on my machine, I press the Cmd-5 key (Top/Plan View). This seems to jog the software back to proper operation. I have been doing this since VW8.5, but don't know why it is necessary. However, it works. Snapping to objects in Symbols and in Groups is restored when I reset the view to Top/Plan. HTH, Raymond G4/OSX.2.6/VW10.1.2
  19. When you group objects that all have the same class, the group gets created with the same class as the objects. When the classes of the objects differ, the group gets the NONE class. What seems strange to me is when the class to create new objects is set to something other than NONE, a group is still created in the NONE class. I would think it should be created in the current class. Why is that? Raymond G4/OSX.2.6/VW 10.1.2
  20. Hi Katie, I know this has been mentioned before, but is there any hope of your development team making the selection behavior user selectable? I, for one, would greatly appreciate being able to work the old way, but having a choice would be the best of both worlds. Thanks, Raymond
  21. I am using a Logitech Wireless Mouse, w/ 2 buttons and a scroll wheel, VW 10.1.2, OSX.2.6. Using the mouse wheel, scroll and zoom both work wonderfully, and no setup was required on my part. A really nice touch with zooming is that the screen anchors at the mouse location, so that spot remains fixed as you zoom. Thanks NNA. It's nice. Scroll up/down with the wheel Scroll left/right with Shift-wheel Zoom in/out with Option-wheel
  22. Thanks for looking at it Katie. I have not seen it today and I haven't had to restart the computer. It seems to be working just fine now. Must be operator error. Thank you, Raymond
  23. I am experiencing intermittent behavior using Option-Click-Drag to duplicate an object(s) and move the duplicate to a new location. Option-Click and then Click-Drag seems to work, but Option-Click-Drag doesn't always work. I haven't yet seen a pattern as to what triggers this. Changing the view or the Layer seems to get it working again (I think). Has anyone else seen this? G4-Dual 500 OSX.2.6 VW 10.1.2
  24. iboymatt is right, symbols cannot be scaled. But, they can be placed, then decomposed, and the resulting group can be scaled. Of course, decomposing a symbol will disconnect it from the original symbol definition, but if that is not an issue to you, try using this code fragment in a script or a PIO. It should get you going in the right direction. HTH, Raymond code: VAR SignalName :String; X, Y, Rot, ScaleFactor :Real; . . . Symbol(SignalName, X, Y, Rot); DoMenuTextByName('Convert to Group Chunk', 1); ScaleFactor := GetLScale(GetLayer(LNewObj)); Scale(ScaleFactor, ScaleFactor);[/code]
×
×
  • Create New...