Jump to content

Jesse Cogswell

  • Posts

  • Joined

  • Last visited


257 Spectacular


Personal Information

  • Location
    United States

Recent Profile Visitors

1,497 profile views
  1. @dtheory I just tested this in both VW2019 and VW022. In document context, I was able to get the command while inside a viewport annotation with nothing selected. It is slightly more "buried" because of the added context commands, so it might just not be in a place you're expecting. As for the snapping palette, I'm very much with you. In one sense, snaps are kind of a set and forget thing for me, the only one I toggle regularly is the Tangent snap, so it being out of the way is great. However, it's now so far out of the way when I do want to toggle something, and now the old shortcut keys are no longer tied to snapping. It took me a bit to realize that 'R' now repeats last menu command rather than toggling the Tangent snap. That being said, there's not much I could do about it in terms of scripting. I COULD write a script for each one to toggle the preference, which would live in a script palette and could change name based on current status, but the far easier thing you can do is put snapping into your Smart Options Display, though it would suck to lose one whole slot to it.
  2. @hollister design Studio Right click context menu is probably best if you want to access it often. I personally have it in a menu alongside my other Viewport scripts. You could also consider putting it on a shortcut key. One final way to get to it would be to write a script that calls the tool and have a script palette open to it so that it's always a double-click away. But keep in mind that the script would live with the drawing and would need to be imported to other drawings.
  3. @Pat Stanford It makes the system chime in Windows when you use any key combination of Alt+<key> regardless of the Session "Use sound" setting. It comes from Windows trying to find a top menu item (Alt+F for File as an example) and not being able to since it doesn't exist. I think it's more a limitation of Windows and less of Vectorworks. It can get annoying since the only way to really turn it off is to disable the chime at the Windows system level or to mute your sound.
  4. I wrote a tool that can change a Viewport's class and layer visibilities from the same window. Even better, it can work while you're inside that Viewport's annotation or crop space. It can be found in this topic:
  5. Hello friends. I had some time this afternoon and wrote a tool that should do this quite handily. It opens a dialog window allowing you to select a Viewport and to set the class and layer visibilities in one window. It will work from almost anywhere, even from inside the Viewport's annotation or crop space and you should see the results as soon as you click OK. It will automatically select a VP for you based on whether you're inside an annotation/crop space, whether you have a VP selected, or whether you're on a layer containing a VP. It was written in VW2019 and should work with any version 2019 and higher. I tested it in VW2021 and VW2022 and it seemed to work as it should. Please let me know if anything is weird or it's not working like you expect or if you need any help getting it installed and in your workspace (it will be in the JNC category in the Workspace Editor). EDIT: I should mention that it detects whether you're inside a Viewport annotation/crop by placing a Locus point, scanning it, and deleting it. You generally won't notice that it's there, but if you run the tool on a Viewport with an active class that is currently set to hidden in the Viewport, you will likely get an alert asking if you want to change the visibilities to allow it to be visible. You can select No without any worries. Set Viewport Visibilities.vsm
  6. Are the layers set to different scales? There is a document setting to Ignore layers with different scale which may be hiding things of different scales. Also, make sure that you have all classes on as well and that you have one of the Show others class view settings on. There's a chance that the objects are in a hidden class.
  7. @Phsion The command you are looking for is vs.LDevice_Reset, though I just ran a little test changing a fixture's DMX address and was able to get it to stick with either LDevice_Reset or ResetObject (at least with Vectorscript). Not sure which version you are in, but Vectorworks now updates all related address fields when one field changes. For example, if you change the UniverseAddress field, it will automatically update Universe, DMX Address, and Absolute Address. EDIT: I just did a test in Python on VW2020, VW2021, and VW2022 with the following code and it was able to make changes stick. def ChangeAddress(h): vs.SetRField(h,'Lighting Device','UniverseAddress','2/101') vs.ResetObject(h) vs.ForEachObject(ChangeAddress,("((SEL=TRUE) & (R in ['Lighting Device']))")) I tried commenting out the vs.ResetObject(h) line, the fields in the OIP wouldn't immediately change, but if I deselected and reselected the fixture, the proper values would be in the OIP. Clicking the Refresh Labels button in the OIP to force a reset on the Lighting Device pushed the new values to the symbol.
  8. @mjm in Python it's only 4 (and could be 3 if you are a bit loose with your whitespace arrangement)! Some day I'll get around to sitting down and getting comfortable working in Python. def GetFlipped(h): if vs.IsObjectFlipped(h) == False: vs.SetDSelect(h) vs.ForEachObject(GetFlipped,("SEL=TRUE"))
  9. @halfcoupler There isn't a great way since "flipped" or "mirrored" doesn't appear as a custom selection criteria choice. So I wrote a quick script that will go through all selected objects and build an array to any objects that are seen as "flipped", then deselect everything and reselect anything in that array. It should do what you are looking for. PROCEDURE DeselectNotFlipped; {* Goes through current object selection and deselects any object not flipped Developed by: Jesse Cogswell Date: 1/7/2022 VW Version: 2022 *} PROCEDURE GetFlipped(h:HANDLE); {Evaluates given object and deselects object if it is not flipped} BEGIN IF(IsObjectFlipped(h)=FALSE) THEN SetDSelect(h); END; BEGIN ForEachObject(GetFlipped,(SEL=TRUE)); END; Run(DeselectNotFlipped); If you need any help with getting this set up, please let me know. If it's a command that you look to use often across many drawings, it would be worth building it as a menu command and saving in your workspace. Also, the script was built in 2022 but will run in any version from 8.0 on. Unfortunately there isn't a script command to determine the flip axis that I could find.
  10. I still use saved views pretty extensively but mainly for changing class and layer visibility, only occasionally actually affecting the view. I wrote a script a couple of weeks ago that automatically generates viewports from saved views, but only carries the class and layer visibilities over, all generated viewports have open crops. I have been trying to find a way to poll the current view window boundary dimensions in a way that I can generate a crop object so that the script will automatically crop the viewports based on the view, but for the life of me I can't find a way of getting the necessary information to make it work. Saved views have relatively few commands in Vectorscript, so it can be really hard to get specific information out of them. I have kind of found a way which polls the whole screen size and uses the current view center, zoom, and scale to build a rectangle, but there's no way to check whether you are running Vectorworks in windowed mode or to compensate for any docked palettes on the sides of the screen, so it's not really a workable option. In any case, my script is attached below. Let me know if you have any questions. Saved Views to Viewports.vsm
  11. This was a change made in VW2021, every version that I've used back to VW2010 would have devices default to off. I also find it incredibly frustrating but have found no way to reset it back to the old behavior. I got so fed up with it that I wrote a script to toggle the embedded Light on/off state for any selected Lighting Device object, then bound that to Ctrl+Shift+L, so I can drop a fixture and quickly hit the keys to turn it back off. This is less than ideal compared to having a tickbox somewhere in Spotlight Document Settings to set default behavior, but at least it's relatively quick. I've attached the script below. To install it, download the attached .vsm file to your <User Folder>\Plug-ins folder. The easiest way to get to this folder if you're not used to accessing it is to navigate to the User Folders section of Vectorworks Preferences. There should be a button labeled either Explore or Open in Finder (depending on operating system). Just make sure the .vsm file is in the Plug-ins folder there. Then restart Vectorworks. Now, you'll need to get the menu command into your workspace. Follow the steps below: Go to Tools - Workspaces - Edit Current Workspace Make sure the Menus tab is active In the box on the left, scroll down and expand the category labeled JNC In the box on the right, find a menu location where you want the command to live (like Spotlight) Click and drag the command Toggle Light On-Off State from the box on the left to the box on the right Assign a shortcut to the command, I use Ctrl+Shift+L since it kind of makes sense and isn't used by a default Vectorworks function. Click OK The command will not run if nothing is selected, and will throw an error if no Lighting Device objects are selected. This command will work for all selected fixtures on the active layer and will toggle their existing states. So if you have four fixtures selected, but only one currently "on", running the command will turn that one "off" and the other three "on". It can be super handy if you want to quickly jump back and forth between two lighting looks without changing each light individually. I should also mention that the command will work for any version of Vectorworks from 2019 and up. Toggle Light On-Off State.vsm
  12. This is a bug that goes back to at least VW2019. It comes up when you're selecting vertices in either polylines or NURBS objects. Every once in a while, the vertex highlight gets stuck on the screen plane. It goes away if you close the drawing and reopen. I usually just ignore it when it happens. That being said, I don't recall seeing it happen in VW2022 very often.
  13. All, I have incorporated some requests from @line-weight to the Saved Views to Viewports command. These changes include: Patched bug when creating viewports on sheet that is currently active not updating Viewport properly Added Viewport Scale to List Browser. If empty, Viewport Settings will populate with currently active layer scale Allows for selecting multiple rows of List Browser. Viewport Settings dialog will show limited fields, just Sheet Layer and Viewport Scale Added Generate Name from Saved View Name button to the main List Browser I tested this in VW2019 and VW2021. Please let me know if there are any troubles. I've never tried it, but I assume that replacing an existing plug-in with this file will wipe out any localization that's been done to the plug-in (such as the name of the Saved Views folder), so be prepared to redo any localization that has been done. Saved Views to Viewports.vsm
  14. All, @MarcelP102 pointed out a bug when running the command while inside the Edit 3D Component of a symbol. Patched script attached. Make Symbol Unique.zip
  15. @MarcelP102 It took me a bit to figure out what was causing the bug, but it was really easy to fix once I found it. The script works by building a "blank" symbol definition using a locus point, then copying all of the components from the original symbol into the new symbol definition, then finally deleting the locus point. It breaks when the script is run inside a symbol, as the locus point is created in the 2D component of the symbol, so the new symbol definition doesn't actually get created. The fixed script will now pull your current view projection and create a 2D locus if in Top/Plan view or a 3D locus if you're in a 3D view. I did some tests and couldn't make it break, so you should be good to go. Happy holidays! Make Symbol Unique.zip
  • Create New...