Jump to content

MullinRJ

Member
  • Content Count

    1,287
  • Joined

  • Last visited

Community Reputation

137 Spectacular

4 Followers

About MullinRJ

Personal Information

  • Occupation
    Circuit Board Designer
  • Location
    Dallas, TX

Recent Profile Visitors

1,513 profile views
  1. MullinRJ

    Vectorscript for Unified View

    You,re welcome. The name threw me, too – again. I knew it wasn't "Unified View" in the documentation because I've been down this road before, but I couldn't remember what it was. I searched for "view" in the documentations and that got me close enough to find it. Glad I could help. Raymond
  2. MullinRJ

    Vectorscript for Unified View

    Hello Ken, This short two line script will toggle the Unified View ON and OFF each time it runs. It will also beep when Unified View is ON, which I use as auditory feedback for its state. SetPref(94, not GetPref(94)); { Toggle Unified View } if GetPref(94) then SysBeep; If you just want to set Unified View ON use: SetPref(94, TRUE); If you want to set it OFF use: SetPref(94, FALSE); HTH, Raymond
  3. MullinRJ

    Path based tool edit mode

    The path always has one vertex (the 1st one) at the origin, like a Symbol Origin. In the drawing that origin point is the same as the insertion point of the PIO. Not sure if this helps. Raymond
  4. MullinRJ

    Vectorworks 2019 and El Capitan

    @Cadplan Architecture I was only stating the obvious and asking for more details about your query. You have provided very little to comment on, beside the direct question which I answered as did @bcd. You imply that someone, perhaps you, is having problems with VW 2019 under El Capitan, but no specifics are given, hence the request for more details. I hope our answers are satisfactory. VW runs very nicely for at least two of us under El Capitan. If you have a more specific issue I'd be glad to elaborate. Until then, Happy VectorWorking. Raymond
  5. MullinRJ

    Vectorworks 2019 and El Capitan

    I have not. Can you be more specific? I notice your signature shows OS 10.10.2 (Yosemite). El Capitan is OS 10.11.x. More details will make for more specific answers. Raymond
  6. MullinRJ

    Dimension Trailer Text

    It looks like you forgot to add your DOIT procedure call before the criteria part. Raymond
  7. MullinRJ

    Rotating and offsetting text

    Michael, Vectors are our friends. Perp(V); { is a 90° CW rotation } Perp(-V); { is a 90° CC rotation } UnitVec(Perp(V)) * aDistance; { scales the vector to exactly the distance you need } where "aDistance" is any real number. The position of the text is point P on your path (a Vector not a Point) + your offset vector (UnitVec(Perp(V)) * aDistance). So: Voffset := UnitVec(Perp(±Vtan)) * Doffset; { the distance between the path and the text object } Ptext := Ppath + Voffset; { the new position of your text object } where Ptext, Ppath, Vtan, and Voffset are Vectors and Doffset is a Real, and this assumes you already know Vtan, Doffset, and Ppath. You can also use SetTextOrientation() to position and rotate your text object. SetTextOrientation(H, Ptext.x, Ptext.y, Vec2Ang(Voffset), False); You'll have to play with your angles, but I bet you're only off by a multiple of 90°. HTH, Raymond PS - Embrace your Vectors, but not the pointy ends.
  8. MullinRJ

    Searching for Data in an external TXT file

    Russell, I just finished a script in Python today that imports a 220 MB text file into a LIST (5,321,708 lines) - one text line per list element. I was able to do some serious parsing of the data (extracting names, searching for complex patterns, combining lines, and marking most for deletion), then write it out and back in to repeat the process a dozen times, all in under 35 seconds. This is not possible in VectorScript (VS), as the largest array in VS is limited to 32K elements. You're 12K item codes would fit into a VS array, but you'll have to code most of the routines you'll need yourself. Chances are, what you want to do is already available in Python as a set of canned routines. For many things, VS and Python are nearly equal in speed. But if you're going to do a lot of string manipulation, Python has way more text handling features than Pascal. It's worth the effort to explore the language. Also, there is a seemingly unending wealth of help sites and fora on the web for Python. Let Google lead you to the answers you seek. My 2¢, Raymond
  9. MullinRJ

    Viewports and Planes Views

    @josue Corona , I assume you mean to do this with VectorScript, considering where you posted your question? Here's a short script showing how to copy a view. The attached file shows the same thing, using the 1st design layer to set the view and a selected viewport to receive the view setting. You can use a similar approach to get the view rotations of a working plane by using the GetWorkingPlane() command. PROCEDURE xxx; { Example script to copy a Design Layer view and apply it to a Viewport. } { Select a Viewport. Run script. } { The script copies the view from the First Design Layer to the selected VP. } { 19 Jul 2019 - Raymond J Mullin } VAR Hdl, Hvp :Handle; procedure ApplyViewFromDLtoVP(Hdl, Hvp :Handle); { Copy the view from design layer (Hdl) to viewport (Hvp). } Var B :Boolean; Vr, Vc :Vector; Begin if (GetTypeN(Hvp) = 122) & (GetTypeN(Hdl) = 31) then if GetViewMatrix(Hdl, Vc.x, Vc.y, Vc.z, Vr.x, Vr.y, Vr.z) then B := SetViewMatrix(Hvp, Vc.x, Vc.y, Vc.z, Vr.x, Vr.y, Vr.z); End; { ApplyViewFromDLtoVP} BEGIN Hvp := FSActLayer; { handle to selected VP } Hdl := FLayer; { handle to an arbitrary design layer } ApplyViewFromDLtoVP(Hdl, Hvp); UpdateVP(Hvp); RedrawAll; END; Run(xxx); Not knowing what version of VW you are running I exported the file as v2016, (and for others using older versions.) Please add a signature to your profile. It really will help people answer your questions more accurately. Raymond Copy View from DL to VP v2016.vwx
  10. MullinRJ

    Move by Points Script

    Maxwell, Not all tools have index numbers. Not sure if this one does or doesn't. Raymond
  11. MullinRJ

    convert vwx to dwg

    Simon, I opened your file in VW 2014 and exported from there. I hope all of the pieces made it through. It looked pretty good when viewed in eDrawings, but check it carefully if you can. If you need a PDF to compare it to, just ask. 30710-A- Topographic Survey-Dwyer v2014.zip Raymond
  12. MullinRJ

    Return In Message()

    You're welcome.
  13. MullinRJ

    Return In Message()

    VW 2011 was the first version that accepted Carriage Return (CR) characters in the Message Window; and Windows and Mac have different codes to accomplish this. The Mac uses CHR(13) for a CR while Windows uses CHR(13), CHR(10). So for Mac: Message('Line 1', chr(13), 'Line 2'); and Message('Line 1', chr(10), 'Line 2'); and Message('Line 1', chr(13), chr(10), 'Line 2'); and for Windows: Message('Line 1', chr(13), chr(10), 'Line 2'); all produce the same output. ______________________________________ x + VectorScript Message ______________________________________ Line 1 Line 2 ______________________________________ HTH, Raymond
  14. MullinRJ

    Script Error

    @The Hamma , That would make perfect sense, but RegularPolygon() is one of those procedures that always takes its input as mm, and not document units. So, YES, you have to scale the inputs to be mm before calling RegularPolygon(). Unfortunately, the documentation does not reflect that. Welcome to the quirky world of VS programming. : ) Raymond
  15. MullinRJ

    Learning Vector Work.

    Josue, The script @Pat Stanford showed you does not work when you are editing inside a Viewport's Annotation Space, nor inside any other container objects, i.e., Symbols, Groups, Profile space of 3D objects, etc. This is because of limitations of the FSActLayer function which only returns handles from selected objects on Design Layers and Sheet Layers. Do a search on "Waldo" in the Vectorscript Forum. You will get several hits that will show you a few lines that will return a handle to a selected object inside a container, like the Viewport's Annotation Space. Waldo is the nickname given to this kind of code that gets you a handle when you are not on a Design or Sheet Layer. Reference "Where's Waldo" to see where the name came from. Have fun and good luck, 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.

×