Jump to content

Jesse Cogswell

Member
  • Posts

    377
  • Joined

  • Last visited

Everything posted by Jesse Cogswell

  1. I think that the issue you are having is because you have the "Dark Background" option on. This inverts black and white to turn the normally bright white background to black to hopefully save you some eye strain as well as make light colors "pop". Having come from programs like AutoCAD and WYSIWYG which have black backgrounds by default, I used to always use this option, but somewhere along the line reverted to the Vectorworks default of the white background unless I'm working on a particularly heinous AutoCAD import that has a lot of yellow lines in it. So, what you see on screen as "white" will print black, and what you see as "black" will print white. The gray values should be unaffected. Their is a nice toggle button built into the UI (which is how I know you have that mode engaged) found here: But you will need to manually flip your black and white values to compensate for this. Hopefully you have all of your pen and fill values set By Class so it's not too much of a headache.
  2. @John Bishop The issue is that the symbol uses standard arc objects to do the sides of the head. Arcs in VW will draw back to their center when they have fills applied. I've had issues using the Use Color Field for Fill Color options because it will override the fill for objects you don't want filled, such as the moving head radius on movers, so I almost never use the option. That being said, a workaround in your current symbol would be to convert the arcs to polylines (will still fill between the outside vertices but at least won't produce giant murder spikes), or, better yet, make sure that the 2D geometry is made up of entirely closed polylines so this kind of thing doesn't happen at all. If I'm being honest, the library SolaFrame 1500 symbol is more than a little rough with a relatively high amount of loose lines, polylines, and arcs that could make data vis a total mess. I would spend a little time with the Polygon tool in Paint Bucket mode and get it down to a handful of closed polylines and remove the loose lines. I should also clarify that this is looking at the stock library symbol from VW2022, there's every chance that the VW2023 is better, I just don't have 2023 open right now and I'm too lazy to check.
  3. Got it got it. The tool I posted above is a slightly newer version that does a better job of separating objects within symbol definitions between the 2D and 3D component. I noticed that when a symbol had objects using the class in only the 3D component, the edit component would only open the 2D component without the Component Edit widget to switch, so now the tool will determine which component to open. Not a major revision, but a good one nonetheless. Someday I'll get around to putting all my scripts up on Gumroad so that I can better handle revisions, but I don't see me having that kind of time until next year.
  4. That being said, I've had a couple of issues when opening up older drawings in VW2022 and VW2023 with weird classes popping up, sometimes named with an assortment of random ASCII characters. I usually delete them and send objects using the classes to None or to a class called "Unknown Error" so that at least it pulls most of the garbage out of my class list. I've never seen it do exactly what you're describing, however. That makes it almost seem like it was trying to do a direct Layer Import rather than a reference. Did you end up deleting the original reference, and is there a chance that you left the Delete options set to import and keep by accident? I think there was some kind of corruption with the reference that caused a normally background process to appear in your class list. If I were in your shoes, I would probably run a save and then try to delete the classes and see what happens.
  5. I wrote a tool that might help you out with this. It launches a dialog that catalogs all items using the selected class and will even go inside symbol definitions and groups and select all objects using the class. It will also populate with symbols when the class is set in the Symbol Options or if a Wall component is set to the class. The only kind of tricky thing is that for hybrid symbols, it will tag the symbol as either 2D or 3D based on which it finds first, but may be contained in both. Which it shows in the dialog will determine which edit component it opens, so you might have to check both. Unfortunately, the code to get into the edit component is one of those undocumented commands shared by Josh Benghiat, so I can't get it to launch the little Component Edit widget when editing the 2D component, so you can't easily switch to the 3D component without exiting the component edit first. One other caveat is that it won't show things within profile and path groups such as extrudes and extrude along paths where the class of the profile and path don't match the final parent object. Locate Class Objects.vsm
  6. For the callout with the leader line extending under the text, the Bubble Style is currently set to ISO. If you want that to go away, change the Bubble Style to None. You can do this all in one go using the script below: PROCEDURE RemoveISOBubble; {Finds Callout object with Bubble Style ISO and reverts them to Bubble Style None} PROCEDURE RemoveISO(h:HANDLE); BEGIN SetRField(h,'Callout','New Bubble Style V20','None'); ResetObject(h); END; BEGIN ForEachObject(RemoveISO,(INVIEWPORT & ((R IN ['Callout']) & ('Callout'.'New Bubble Style V20'='ISO')))); END; Run(RemoveISOBubble); To get this working in your drawing, go the the Resource Manager, right-click and select New Resource - Script. It will ask you name a Script Palette to put this in, which could be something like "Macros" or whatever you need. Then name the script something like "Remove ISO Bubble Style" and copy and paste the code from above. Make sure that VectorScript is the selected language and press OK. This should populate into a small palette on the screen. Double-click the script in the palette to run it.
  7. I've run into this several times with my CAD Mouse between versions of Vectorworks. I remember having an issue with VW2023 as well. What it essentially amounts to is that the 3DConnexion software does not have a default profile for the particular version of Vectorworks and is trying to use a generic Vectorworks profile. If, when you open up the 3DConnexion Properties window for Vectorworks, it shows the profile of just "Vectorworks" and not "Vectorworks <year>", it's trying to use the generic. This is usually fine, as long as you have not used the mouse with another Vectorworks version using the generic. I hop between VW versions fairly often depending on who my client is and which version they are using, and opening up VW2023 broke my mouse profile for not only VW2023, but also VW2019. But there is, thankfully, a pretty easy solution. I don't know what platform you are using, but you'll want to find the folder containing the default profiles for your mouse. On windows, this will be found at the path C:\Program Files\3Dconnexion\3DxWare\3DxWinCore\Cfg. If you don't find a configuration called Vectorworks2023, you will need to create one. The easiest way is to duplicate an earlier profile (such as Vectorworks2022), and edit the XML file using a text editor and update all of the text from 2022 to 2023. Then you should be set to edit the profile properly in Vectoworks 2023. At least that's what worked for me.
  8. Styles were implemented in 2021 for a lot of the notation object. This is a bit of a mixed bag, as you now need to juggle drawing resources for the different permutations that you need, but now also have a lot more ability to customize look and feel as well as information presented. Personally, I find the new Drawing Label tool a bit too cumbersome and find myself using the legacy version instead. I prefer to be able to make changes to the label from the viewport annotation rather than having to edit the Style resource, especially if I need a "one-off" label that needs to have something slightly different parameters than my general one, but I also see the benefit of the new system in terms of enhanced customization. As a general tip/trick: Vectorworks very rarely gets rid tools entirely, they just remove them from the workspace and replace them with the newer ones. If you go into the Workspace Editor and open up the Legacy category in the box on the left, you'll find a lot of the older tools. I still often use the older Drawing Label and Drawing Border (I don't need a lot of the newer features to the Title Block Border, I have all of my title blocks built as symbols and ready to use with the old system, and I find that it much, much faster to edit than having to deal with the new Title Block Manager dialog).
  9. Make sure that you uncheck this option in the Document Preferences. Shaded mode is an evolution of the older OpenGL mode, which had a limitation of only being able to show 8 lights at a time and was finally defeated for VW2023, but the option may still be toggled if working from a VW2022 file.
  10. I'm trying to get a read on exactly what you are asking for, but all of this sounds very doable using a combination of ObjectVariables and the Get/SetLayerRenderMode procedures. The script below will toggle between a state of Shaded, black background, ambient light off and a state of Wireframe, white background, ambient light on. It uses the current black background status to determine which mode to change to. PROCEDURE ToggleShadedBlackAmbient; {* Toggles state between [shaded render, black background, and ambient light off] and [wireframe, white background, and ambient light on] using black background as a check Developed by: Jesse Cogswell Date: 9/28/2022 *} CONST kBlackBkgrd = 16; kWire = 0; kShaded = 11; kAmbient = 150; VAR currentStatus:BOOLEAN; BEGIN currentStatus:=GetPref(kBlackBkgrd); CASE currentStatus OF TRUE: BEGIN SetObjectVariableBoolean(ActLayer,kAmbient,currentStatus); SetLayerRenderMode(ActLayer,kWire,FALSE,FALSE); END; FALSE: BEGIN SetObjectVariableBoolean(ActLayer,kAmbient,currentStatus); SetLayerRenderMode(ActLayer,kShaded,FALSE,FALSE); END; END; SetPref(kBlackBkgrd,NOT currentStatus); END; Run(ToggleShadedBlackAmbient); If you want this to merely toggle between black background and ambient light off to the opposite, just remove the SetLayerRenderMode calls from the CASE statement. If you want a separate command to toggle between wireframe and shaded, the command would look something like this: PROCEDURE ToggleWireShaded; {* Toggles between Wireframe and Shaded rendering modes Developed by: Jesse Cogswell Date: 9/28/2022 *} CONST kWire = 0; kShaded = 11; BEGIN CASE GetLayerRenderMode(ActLayer) OF kWire: SetLayerRenderMode(ActLayer,kShaded,FALSE,FALSE); kShaded: SetLayerRenderMode(ActLayer,kWire,FALSE,FALSE); END; Layer(GetLName(ActLayer)); END; Run(ToggleWireShaded); I'm assuming that you are familiar with the process to make these scripts into menu commands to attach keyboard shortcuts to, but let me know if you need a refresher.
  11. Even though Vectorworks deprecated the Screen Plane, it still uses it to determine which component of the symbol an object belongs to (either 2D or 3D). This screwed up a major part of my workflow when converting 3D symbols to hybrid symbols, as I would have to enable the legacy feature just to move the 2D objects over to the 2D component, then disable the legacy feature. The good thing for you is that this is a simple fix: just remove INSYMBOL from your criteria. Even better, you will also no longer need the ForEachObjectInList call since you won't need to reset the symbol definitions. Even though the Screen Plane is deprecated in the general sense, it is still absolutely necessary for Vectorworks to sort objects within a symbol. And, knowing how this works behind the scenes, I very much doubt that this change. I haven't yet had the opportunity to play with VW2023 (though I'm hoping I'll get time this afternoon), so I don't know if they fixed this. In my email conversations with them, they talked about adding the Screen Plane back in only when working within 3D symbols and calling it something like "2D Component" so that you can force objects to the 2D component without enabling the legacy feature, but I don't know if the change was implemented. I've attached the video that I sent to VW right after the 2022 release that demonstrates this. JNC Screen Plane Demo.mp4
  12. @Sam Jones Weird, it's working flawlessly for me in VW2022 (in the middle of tech and haven't gotten around to installing VW2023 yet, but do have it downloaded). Before running script: After running script: Script editor:
  13. Easy-peasy. Just create a new script in the Resource Manager, set the language to Vectorscript, and copy and paste this code in: SetPref(1055, NOT GetPref(1055)); This will act as a toggle for the setting and can be activated by double-clicking the script within the script palette. You could also make it an official menu command to bind it to a keyboard shortcut if you would like.
  14. @Sam Jones Weird, when I test it (at least in VW2019), doing result:=A.x - Origin.x gets me the inverse of the coordinate, which is useful when in conjunction with an HMove command to center the VP, but not if you are just looking for the coordinate center of the VP.
  15. @Sam Jones To get the actual center of the VP, you would use something like this: GetOriginInDocUnits(Origin.x,Origin.y); HCenter(h,A.x,A.y); result.x:=A.x+Origin.x; result.y:=A.y+Origin.y; With h being a handle to the Viewport.
  16. @shorter Here's a menu command that will do the trick. It opens a dialog box allowing you to select Design Layers and specify a starting Sheet Number. When you press OK, it will create a separate Sheet Layer for each selected Design Layer and a Viewport looking at only that Design Layer. It uses the Design Layer's scale to set the Viewport scale, and uses the class visibilities as they are when the command is run. The Sheet Layer and Viewport Drawing Title are named based on the target Design Layer, and the Viewport is named based on the standard VW VP naming (Drawing #/Sheet #). There is an added option to center the created Viewports on the new Sheet Layers, otherwise they'll appear in relative space similar to when you just run the Create Viewport command. The page setup for the Sheet Layer will be based on the current page setup options. The Sheet Number will automatically increment around existing naming conflicts (IE if you specify starting sheet "A1" but a sheet A1 already exists, the resulting sheet will be changed to "A2"). To install this plug-in, follow the steps below: Download the attached Sheet Layers from Layers.vsm file. Open up your User Folder for your Vectorworks installation. The easiest way to find this is to open the Vectorworks Preferences, navigate to the User Folder tab, and press Explore / Open in Finder. In the resulting explorer/finder window, open up the Plug-ins folder. Drag and drop the downloaded .vsm file into the Plug-ins folder. Restart Vectorworks. When Vectorworks starts up, it will see the new file and recognize the plug-in, but the command will still need to be added to the workspace. Go to Tools - Workspaces - Edit Current Workspace Select the Menus tab In the box on the left, find and expand the category JNC In the box on the right, find and expand a menu to place the command in (such as View) Drag and drop the Sheet Layers from Layers command from the box on the left to the target menu on the right. Press OK. This command should work on any version of Vectorworks 2019 and newer. Let me know if you see any unexpected behavior. Sheet Layers from Layers.vsm
  17. @DBLD I've had some trouble when working on really heavy scenes. When I have a ton of emitters (usually with ColorForce 72s and X4 Bars) and push my computer a little too hard, I'll start having sources drop out, and the only way to get them back would be to close and reopen Vision. On my last laptop, I had an issue where if I turned on ANY lights before rendering a video, seemingly random sources would not render at all. I got to the point where I would regularly restart the program, and, after finishing the work and rendering out a video, I would restart before recording the DMX stream, and would restart before rendering making sure that DMX was disconnected and that I would not accidentally click on a light. Just load the DMX stream and go right to rendering. If I did anything to produce a beam, I could not reliably get a rendered video with all sources.
  18. The image prop route is a really great quick and dirty way to make flat images. But you do need to remember to kill the glow shader that is added by default if you intend to do Renderworks renderings.
  19. I also have a tool that can be used to track down any objects using a selected class, such as objects embedded in symbols, groups, viewport annotations, etc. It can be found in this post:
  20. To anyone who uses the Replace Name Text tool that I posted above, I have a new version that fixes a few bugs and adds a couple of features. Fixed a bug resulting from unknown object types not found in the Function Reference Added a checkbox to limit name replacement for only selected objects (helpful when renaming Viewports) Allows for leaving the Replace With field empty, letting the user remove text Please let me know if anything breaks or doesn't work as intended. Installation will be the same as listed above. Replace Name Text.vsm
  21. @MarcelP102 is correct, this plug-in will work on any named object, including classes and layers. It makes renaming classes and removing parent classes really simple. To install, follow the instructions below: Download attached .vsm file Find your User Folder. The quick and dirty way to do this is to go to your Vectorworks Preferences, go to the User Folder tab, then click on Explore / Open in Finder. This will open your user folder in a separate window. In the explorer/finder window, find the Plug-ins folder and open it. Move the downloaded .vsm file into the Plug-ins folder. Restart Vectorworks. Now, you will want to add the menu command to your workspace. Go to Tools - Workspaces - Edit Current Workspace. Make sure that the Menus tab is selected. In the box on the left, expand the category JNC, you should see a command called Replace Name Text. In the box on the right, find a menu where you want to access the command (such as Tools). Drag and drop the command from the box on the left to the box on the right. Click OK. The tool allows you to have only look at selected objects (for renaming Viewports, for example), and the list browser is automatically sorted by object type. It looks at Plug-in Objects, Layers, Classes, anything with a name aside from Symbol Folders (there is a bug where changing the symbol folder name with a script doesn't properly update the Resource Manager, so the folder essentially disappears, so I removed that possibility). It will highlight whether the resulting change will cause a naming conflict with another resource as well. You can leave the Replace With text box empty if you want to remove text. Please let me know if you have any questions. I should also mention that this tool will work with any version of Vectorworks from 2019 to the current release (and presumably 2023, won't know until it releases). Replace Name Text.vsm
  22. I wrote a script that can kind of do this back in 2021. It works great for none-database worksheets as it creates references back to the original worksheet. For databases, it unfortunately has to make the database data "absolute" in order to split up the worksheet, so it's best to do once the drawing is more or less finalized. Also, I should mention that, last time I tested it, it didn't properly pull images over, so if you're using it for a plant schedule with images of the symbols, it probably won't work for you. I unfortunately don't have the time at the moment to dig in and incorporate images right now, but it's theoretically possible.
  23. This topic is not related to Vision, which is a separate pre-visualization software owned by Vectorworks. To answer your question, what you need to start with is a RenderWorks Camera. In the standard workspace, you'll find it in the Visualization toolset, which has a lightbulb as an icon. Place your camera and get the view how you want it. Once that's done, select the camera, and go to View - Create Viewport. This will ask if you want to convert the camera or create a copy of the camera, choose whichever makes sense to you. After that, your Viewport will be created with the camera's view. Double-click the Viewport and select Camera as your edit target. Then you'll be able to make adjustments to the camera view. If you opt to make a copy of the original camera, the camera will remain independent of the Viewport (much to our chagrin). The only way to adjust the view is through the Camera option of the Edit Viewport dialog box.
  24. Mostly possible. I wrote out a script that you can assign to a hot key to get into the crop and annotation space of a VP, but had a lot of trouble with the camera and could find no way for the Edit Section In-Place. To get these scripts to work on your machine, go to Tools - Plug-ins - Plug-in Manager. Make sure the Custom Plug-ins tab is active, and click on the New button. Select Command from the radio button list and click OK. Then click Edit Definition to give it a name and category. Then, click Edit Script and copy and paste the script into the editor. Do make sure that the Language drop-down at the top is set to VectorScript, since that's what these are written in. Then you should be able to find it in the Workspace Editor and assign a hotkey to it. Edit Annotations: PROCEDURE OpenVPAnno; {* Opens up selected Viewport Annotation Space Developed by: Jesse Cogswell VW Version: VW2022 Date: 9/1/2022 Revisions: *} CONST kEdit = 9743; kVP = 122; VAR currentLayer:STRING; PROCEDURE OpenAnno(h:HANDLE); {Opens annotation space of given viewport} VAR hAnno:HANDLE; BEGIN hAnno:=GetVPGroup(h,2); SetObjectVariableInt(hAnno,kEdit,0); END; BEGIN currentLayer:=GetLName(ActLayer); ForEachObject(OpenAnno,((SEL) & (L=currentLayer) & (T=kVP))); END; Run(OpenVPAnno); Edit Crop: PROCEDURE OpenVPCrop; {* Opens up selected Viewport Crop Space Developed by: Jesse Cogswell VW Version: VW2022 Date: 9/1/2022 Revisions: *} CONST kEdit = 9743; kVP = 122; VAR currentLayer:STRING; PROCEDURE OpenCrop(h:HANDLE); {Opens crop space of given viewport} VAR hAnno:HANDLE; BEGIN hCrop:=GetVPGroup(h,3); SetObjectVariableInt(hCrop,kEdit,0); END; BEGIN currentLayer:=GetLName(ActLayer); ForEachObject(OpenCrop,((SEL) & (L=currentLayer) & (T=kVP))); END; Run(OpenVPCrop); As for camera, I was not able to find a way to successfully "activate" the camera or open in the correct edit container, but I was able to get a handle to the camera object itself, so if anyone knows of an ObjectVariable or function that can get to the activated view of the camera from inside the viewport, please go ahead (and share with the class!). The code I have now identifies whether the selected VP contains a camera, and if it does, it goes through the list of named objects until it finds an object which has the Camera Attached to Viewport flag, then checks if it's the selected VP. If it is, it pulls the parent of the camera (which is the VP container) and opens it. This correctly opens the Viewport edit container, but not the same one that you would get by selecting Edit Camera in the VP edit dialog. There's a terrific chance that this is impossible with the current VectorScript function library (but I would be very happy to be wrong about this). What I have for code is listed below. I do have a commented out AlrtDialog that returns the name of the camera, just as a confirmation that the handle is correct. PROCEDURE OpenVPCamera; {* Opens up selected Viewport Camera if one exists Developed by: Jesse Cogswell VW Version: VW2022 Date: 9/1/2022 Revisions: *} CONST kEdit = 9743; kVP = 122; kVPCamera = 1037; kCameraAttached = 1038; VAR currentLayer:STRING; hCam:HANDLE; FUNCTION OpenCamera(hVP:HANDLE) : HANDLE; {Searches for cameras attached to VPs and returns handle to camera of given VP} LABEL 99; {Name Escape} VAR i,view:INTEGER; h,h2:HANDLE; BEGIN FOR i:=1 TO NameNum DO BEGIN h:=GetObject(NameList(i)); IF(GetObjectVariableBoolean(h,kCameraAttached)) THEN BEGIN IF(GetVPGroupParent(GetParent(h))=hVP) THEN BEGIN view:=GetObjectVariableInt(hVP,1007); h2:=GetParent(h); GOTO 99; END; END; END; 99: IF(h2<>NIL) THEN BEGIN SetObjectVariableInt(h2,kEdit,view); OpenCamera:=h; END; END; PROCEDURE CamCheck(h:HANDLE); {Checks if given VP has camera attached} BEGIN IF(GetObjectVariableBoolean(h,kVPCamera)) THEN hCam:=OpenCamera(h); END; BEGIN currentLayer:=GetLName(ActLayer); ForEachObject(CamCheck,((SEL) & (L=currentLayer) & (T=kVP))); {IF(hCam<>NIL) THEN AlrtDialog(GetName(hCam));} END; Run(OpenVPCamera);
  25. Taking a quick glance, it looks like you are deleting the object h2 before you get to your if isSymbol check, so the prevObj = vs.PrevObj(h2) doesn't do anything since h2 would be nil.
×
×
  • Create New...