Jump to content

MullinRJ

Member
  • Content count

    1,143
  • Joined

  • Last visited

Community Reputation

52 Excellent

4 Followers

About MullinRJ

  • Rank
    1000 Club

Personal Information

  • Occupation
    Circuit Board Designer
  • Location
    Dallas, TX

Recent Profile Visitors

1,044 profile views
  1. MullinRJ

    convert vwx to dwg

    I have no way of verifying if this is a good conversion. Try it and see. Draft 1.8-Backup-20180602203117.zip Raymond
  2. MullinRJ

    screen plane only

    You are welcome, Julia. Welcome to the world of scripting. While you are trying the One-Beep approach, let me offer another flavor. You can very easily make the script BEEP in the other direction, when LAYER PLANE mode is made active, if that is more to your liking. This line controls the BEEPing. if GetPref(1099) then SysBeep; and it beeps when GetPref(1099) is TRUE, or when SCREEN PLANE mode gets set. If you'd prefer the script to BEEP when LAYER PLANE mode gets set, then use this line instead: if not GetPref(1099) then SysBeep; the "not" keyword reverses the logic and says to BEEP when GetPref(1099) is FALSE, or LAYER PLANE mode gets set. If you find that you use this script a lot, the next step for you is to turn this script into a MENU COMMAND, add it to your workspace, and assign a Keyboard Shortcut to it. So instead of placing a copy of this script in every file you use, you will place it in the VW Plug-ins folder where it becomes a systemwide command. It's a little more work to set up, but well worth the effort if you want to work as efficiently as possible. When you figure out which flavor of the script suits you best, write back and I, or someone else here, will assist you to make it a custom Menu Command. All the best, Raymond
  3. Years ago I used to swap right and middle button functions with the Logitec Control Center (mouse driver). I think it stopped working for me because my Mouse got too old and I fell into a software/hardware/OS support gap. I would look for Mouse Drivers that support this if you can't get there inside VW.
  4. MullinRJ

    screen plane only

    Hi Lupin, Yes, it can be made to BEEP in both directions, but the intention of the BEEP is to indicate which way the script has run. When you hear the BEEP, you know without looking the menu is set to SCREEN PLANE. When you don't hear the BEEP you know without looking the menu is set to LAYER PLANE. I think you got the direction of the beeping backwards, but that assumes you copied the script exactly as it is above. However, this is very unimportant. If you just want to know the script has run because you hear the BEEP, then change your script as follows: { This script will toggle the "Active Plane Menu" between "Screen Plane" and "Layer Plane", } { and BEEP each time the script is run. } { 20 June 2018 - Raymond J Mullin } SetPref(1099, not GetPref(1099)); SysBeep; Notice I removed the IF statement on the last line but left the SysBeep command. The script will now toggle the 1099 preference value to its opposite state, and then BEEP, every time. HTH, Raymond
  5. MullinRJ

    PDF Export, ResetObject

    Well, that's the first time I've seen that ObjVar used, though a quick search shows it appeared in VW 2014's documentation. I learn something new every day, even when I don't want to ;-) However, it does say "for use with SDK objects ONLY". Have you tried with VS or Python PIOs? If SDK Only, then it's true, the VS engine can only handle one task at a time without interruption. I can live with that. Thanks, both, for the info. Raymond
  6. MullinRJ

    PDF Export, ResetObject

    Dom, I think you can only get your approach to work if you split your code in two. Your first script will contain everything up to, and including, your RESET calls. When your first script ends, VW will then reset all of the objects you marked to be reset. Your second script can then execute the DMTBN( 'Export PDF') call. It's a very sequential process, but your "Export" call cannot begin until all of the PIOs get reset, and they will not reset until after your script ends. Therefore you need two scripts that you will will launch sequentially. Not entirely elegant, but easily accomplished. HTH, Raymond
  7. MullinRJ

    convert vwx to dwg

    Here you go... Raymond aktuell_RBL_Haus Heinrich v2015.vwx
  8. MullinRJ

    Block/Unblock Scripts in Woksheets

    IIRC, when you select ALWAYS ALLOW, it is only for that session of VW. After VW restarts you will be presented with the question again. It took me a little while to figure out the scope of these selections, but I kind of like this level of intrusion. I don't have to worry about leaving the back door open forever if I forget to close it. For files of my own creation, I click ALWAYS ALLOW and keep working. If I am going to work on a questionable file, I can restart VW and I am covered again. Not ideal, but very workable. Raymond
  9. MullinRJ

    Script for fill of different color

    SetFillBack() is the call to edit a single object's background color. There is no SetFBack call, it was a typo. These calls are all documented in the Script Function Reference. If this were still a book printed on paper, you'd carry it with you everywhere, Consider it the VW Programmer's Bible. HTH, Raymond PS - Pat, thank you for the compliment. Also, in your previous example you set the Fill BG color to WHITE. Shouldn't it be set to BLACK? SetFBack(h, 0, 0, 0);
  10. MullinRJ

    Script for fill of different color

    You must also be careful here, too. SetFPat { FILL Pattern } 0 = No Fill 1 = Solid Fill using the BACKGROUND color { VW uses this as the default for SOLID FILL } 2 = Solid Fill using the FOREGROUND color In contrast: SetLS { LINE STYLE, the equivalent of the Pen's Pattern } 0 = No Pen 1 = Solid PEN STYLE (pattern) using the BACKGROUND color 2 = Solid PEN STYLE (pattern) using the FOREGROUND color { VW uses this as the default for SOLID PEN } And then there is that negative value thing to contend with, too. Good luck with all of this, Raymond (Make it confusing once, and it stays confusing forever. I wish I knew who to thank for this 😉 )
  11. MullinRJ

    wall scripts

    murad, Since you are new to scripting, you should try what we all have done to learn by example – draw some objects of interest, then export a script to a text file. The Export options can be found under the File menu. In your case, draw some walls (30 cm thick), with your desired line weight (18 mils?), and add some hatches. After exporting this as a script, you can find the relevant code deep in the middle of the file. Look for the comment "Object Creation Code". That comment will appear several times in the script (at the beginning of object creation, before each layer in the file, and at the end of object creation), but it will get you close. This is a really good way to get your feet wet. Good luck, Raymond
  12. MullinRJ

    Opening multiple files in separate windows in VW 2018

    Pity. It's a feature I use all the time. Perhaps another PC user can offer advice to help you. Raymond
  13. MullinRJ

    Opening multiple files in separate windows in VW 2018

    Jainsworth, Welcome to the VW Forum. On the Mac, I uncheck the "Use Application Window" menu and I get individual windows for each file. I think you can also tear a TAB away and a new window will be created when you release the mouse button. I can only assume it is the same on the PC. Here's the menu as it is on my Mac. Each time I open a file it opens in a new window with "Use Application Window" unchecked. HTH, Raymond
  14. MullinRJ

    Viewport Position

    Gotta run, but I have 1 quick thought and no idea how it will affect viewports. Have you tried ResetObject()? This is a lot of what programming is about when you are learning, and after 30 years scripting with MC/VW I'm still learning. When in doubt, try something, anything, and take notes. Good luck, Raymond
  15. MullinRJ

    Viewport Position

    Martin, IFF [sic] you really want to GROK the whole VectorScript experience, you'll have to procure a copy of "Hitchhikers Guide to All Things VectorScript (and Python, too!)." However, it may be a bit easier to download a copy of the SDK from the VW site: http://www.vectorworks.net/support/custom/sdk/sdkdown and look for this file: .../SDK/SDKVW(build#)/SDKLib/Include/Kernel/MiniCadCallBacks.h In it you will find long sloppily typed lists of extremely esoteric and somewhat arcane factoids. When you find yourself standing precisely in Ra's shadow, notice the following illuminations: const short ovViewportXPosition = 1024; // double read only - the X coordinate of the viewport on the sheet layer - Public for VS const short ovViewportYPosition = 1025; // double read only - the Y coordinate of the viewport on the sheet layer - Public for VS That is how I know 😉 If this doesn't help, ... Raymond
×