Jump to content

Jesse Cogswell

Member
  • Posts

    233
  • Joined

  • Last visited

Reputation

174 Spectacular

5 Followers

Personal Information

  • Location
    United States

Recent Profile Visitors

1,051 profile views
  1. I'm going to be honest here, I am not a huge fan of Marionette. I find it clunky and slow and far less powerful than writing scripts. The only advantage it has over scripting is the ability to have a Plug-in Object exist entirely within a drawing, allowing users to have custom parametric objects without having to share and install plug-ins. That being said, it is much more approachable than scripting if you don't have coding experience. I played around with replicating my script using just vanilla Marionette nodes and was able to get it pretty close. The only thing I wasn't able to solve is that it groups all of the 3D Locus points together, and I was not able to find a way to ungroup them without manually doing it after running the script. The Marionette you started above can be simplified. There's no need to mess with the List or Set Select nodes as the Objs by Crit node will automatically produce a list of all objects meeting the criteria. From there, you need a Delete node to delete the source 2D Locus Points, and a Get Location to pull the X and Y coordinates as a Point 2D. The Locus node will build either a 2D Locus Point or a 3D Locus Point depending on what kind of point is given as an input, so you can use a Get XY node to pull apart the data from the Get Location node, adding an additional Real input node with a Point 3D node to get the requisite 3D point to force the Locus node to generate a 3D Locus Point. A Get Class and Set Class node will match the class of the source Locus Point. Now, this will convert EVERY 2D locus point in the drawing that is not embedded in a symbol or plug-in object to be converted to a 3D locus point, and all on the active layer. So if you want to fully replicate my script from up above (and only convert selected 2D Locus Points), you have to wrap the network and convert it to a menu command, since selecting the network or the wrapper will deselect the Locus Points. There are a couple of issues, as the whole network has to be run as part of creating the wrapper, and you will get an error with the Get Location node for having an empty list on the input. So you'll need to add a Valve node to execute the network only if the list is not empty. My test document is attached (in VW2021 format). Convert 2D Locus Marionette.vwx
  2. Ah, missed a parenthesis around SEL=TRUE in the ForEachObject criteria. That's what I get for testing it with a file of only locus points. Fixed code below. I also added a check so that it will only work on selected locus points on the active layer, so you won't accidentally convert locus points selected on a non-visible layer, or a visible layer with Layer Options set to Show/Snap Others. PROCEDURE Convert2DLocusTo3D; {* Converts selected 2D Locus Points to 3D Locus Points at given Z height Developed By: Jesse Cogswell VW Version: 2019 Date: 9/2/2021 *} VAR height:REAL; locusCount:INTEGER; heightStr,currentLayer:STRING; PROCEDURE ConvertLocus(h:HANDLE); {Pulls location and class data of given 2D Locus Point and replaces it with a 3D Locus Point} VAR A:POINT3D; class:STRING; BEGIN locusCount:=locusCount+1; GetLocPt(h,A.x,A.y); A.z:=height; class:=GetClass(h); Locus3D(A.x,A.y,A.z); SetClass(LNewObj,class); DelObject(h); END; BEGIN locusCount:=0; heightStr:=StrDialog('Enter Z Height','0'); currentLayer:=GetLName(ActLayer); IF(ValidNumStr(heightStr,height)=TRUE) THEN BEGIN ForEachObject(ConvertLocus,((SEL=TRUE) & (T=LOCUS) & (L=currentLayer))); IF(locusCount=0) THEN AlertInform('No 2D Locus Points Selected','',FALSE); END ELSE AlertInform('Please Enter a Valid Height','',FALSE); END; Run(Convert2DLocusTo3D);
  3. @the frog Wrote up a quick script for you in Vectorscript. It brings up a dialog asking for a Z Height, then replaces selected 2D Locus Points with 3D Locus Points at the given height. Let me know if you have any questions about getting this script into Vectorworks as either an instance in a script palette (per drawing) or permanently into your workspace. PROCEDURE Convert2DLocusTo3D; {* Converts selected 2D Locus Points to 3D Locus Points at given Z height Developed By: Jesse Cogswell VW Version: 2019 Date: 9/2/2021 *} VAR height:REAL; locusCount:INTEGER; heightStr:STRING; PROCEDURE ConvertLocus(h:HANDLE); {Pulls location and class data of given 2D Locus and replaces it with a 3D Locus Point} VAR A:POINT3D; class:STRING; BEGIN locusCount:=locusCount+1; GetLocPt(h,A.x,A.y); A.z:=height; class:=GetClass(h); Locus3D(A.x,A.y,A.z); SetClass(LNewObj,class); DelObject(h); END; BEGIN locusCount:=0; heightStr:=StrDialog('Enter Z Height','0'); IF(ValidNumStr(heightStr,height)=TRUE) THEN BEGIN ForEachObject(ConvertLocus,(SEL=TRUE & (T=LOCUS))); IF(locusCount=0) THEN AlertInform('No 2D Locus Points Selected','',FALSE); END ELSE AlertInform('Please Enter a Valid Height','',FALSE); END; Run(Convert2DLocusTo3D);
  4. @mlachenal You can get this script into your menu bar following the steps below: Open up the script editor that you wrote this in. Select everything and copy it. Go to Tools - Plug-ins - Plug-in Manager. Click on the Custom Plug-ins tab. Click New. Select Command and give your command a name. With the new plug-in selected, click on the Edit Script button. Paste in your code, make sure the Language is set to Python, and click OK. Close the Plug-in Manager window. Go to Tools - Workspaces - Edit Current Workspace. Click on the Menus tab. In the box on the left, navigate down to the Miscellaneous category and expand it, your new command should be there. In the box on the right, find a place for your script to appear. Click and drag the plug-in from the box on the left into the box on the right. Click OK. I should also note that the category that the plug-in appears with in the Workspace Editor is "Miscellaneous" by default but can be changed from the Plug-in Manager window by clicking the Edit Definition button and selecting a different category or creating your own.
  5. Vectorworks uses something of a global naming scheme. Symbols, classes, viewports, lighting positions, anything that can be named all share the same pool. What I'm guessing is happening is that you have a symbol named "Circle" as one of your label legend containers. If so, you can rename it to "Circle Symbol", which will open up Circle as a possible name for your position. It can get really frustrating in Vectorworks to track down naming conflicts, as the conflict might not exist on the drawing itself, being a class name or a symbol definition, so even running a Tools - Selection - Custom Selection with the criteria set to look for any Object whose Name equals Circle might not turn anything up. I've gotten very strict with my naming within my own drawings, anytime I make a symbol, I make sure to include "Symbol" at the end when I name it.
  6. @Benson Shaw Here's a link to the script that I wrote to connect either 2D or 3D locus points to create a polygon.
  7. Vectorworks can absolutely count nested symbols. If you are doing it inside a worksheet, you just want to make sure that you have INSYMBOL as part of the criteria (or INOBJECT if you want to count inside plug-in objects). Attached is a screenshot that I set up for a quick test which shows the formula in the worksheet. Likewise, running Tools - Custom Selection also gives the proper results when Include Components of Symbols is checked.
  8. One solution that you might consider using for your symbol is to set it to have size be page based rather than world based. To do this, I would recommend creating your symbol directly on a sheet layer to determine best sizing. Then in the Create Symbol dialog, select Page-based under the units section. This will create a "green" symbol and will always appear to be the same size when printed regardless of scale. This holds true whether the symbol is inserted in a design layer or as part of a viewport annotation.
  9. I've been seeing this fairly often in VW2021. At this point I just ignore it.
  10. I downloaded the file and took a look at it. The thing that I am seeing is that any 3D Locus point has its "legs" extended way outside the space. Every one of your chair objects has a 3D Locus at its center, so it becomes a mess. Just look at this isometric view in wireframe: The issue is that the ends of those locus points basically extend out into infinity, technically putting geometry too far away from your Internal Origin, which causes all of the anomalies that you are seeing. While you can remove the 3D locus points from your chair symbols, there are some baked in to the Truss objects, so I don't think you will be able to get rid of them completely. This is a similar issue to this post here: But the fix that @Pat Stanford wrote for that one doesn't seem to fix this issue. I went through all of the Vectorworks preferences in the application itself (Document Settings, Spotlight Settings, Vectorworks Preferences) as well as the scripting side and could not find a preference that I could toggle to get this fixed. Even setting #D locus points to never being visible still causes the graphical issues of having objects too far away from the Internal Origin. So, I don't know how to help you. But I am indeed seeing the same issues that you are in your file. I also tried backsaving to 2019, but it didn't resolve the issue. If I removed all of the objects with 3D locus points from the drawing, the 3D flyover would behave properly, and newly placed 3D locus points would likewise behave properly. I could also place the Event Chair 1 without having the huge locus points. I know it's at the expense of time, but try deleting the seating, the trusses, and the LED screen and rebuilding them.
  11. I just ran a test going from both Vectorworks 2019 and 2021 to Vision 2021 and had no problem getting focus to come across as long as the Focus Point objects were listed and checked in the Object Types box of the Export MVR File dialog box. Also make sure that your Vision is completely up to date, I remember there recently being a bug where this functionality was broken, but as of version 26.0.4, it appears to work correctly. My bigger problem with the MVR export is that color and gobo data doesn't come across in the export. I have found that it's best to split my Vectorworks export into pieces. Scenery and theater architecture as MVR for the better normal and texture mapping (though I've occasionally run into an issue where texture names overlap, since the MVR export seems to rename textures to "Textr#" without regard to file) Movers as MVR export for easier data reconciliation Conventionals as ESC export to retain focus, color, and gobo information I tend to like having more granular control of by Scene Graph, so having multiple layers from the exports is actually welcome. And it prevents me from having to use Vision's awful color picker. Seriously, can we please get a text field where we can type in something like "R26" rather than having to scroll down to Roscolux, expand it, then scroll down to the color to select it? It's a huge drag in a large plot using multiple color manufacturers. All the more or a bummer that we already have to enter the color and gobo information twice (once in the OIP and once in the Edit dialog) for it to even come through in the ESC export.
  12. Keep in mind that I only have experience with MVR and Vision, but what works for Vision might also work for Capture and Depence2. The trick with getting focus information in to Vision is to add Focus Point objects in as part of the MVR export. Either make sure they are selected (if your MVR settings are set to selected objects), or visible (if your MVR settings are set to visible objects) before your run the Export MVR command. They will get their own category in the MVR export window.
  13. Open up Vectorworks Preferences. Click on the Session tab and click on the Reset Saved Settings button. Keep in mind that this will reset ALL of instances where you clicked "Do not show me this again."
  14. Vectorworks very rarely completely remove tools, they just remove them from the default workspace. If you go to Tools - Workspaces - Edit Current Workspace, you will be able to find the old Hoist tools under the "Legacy" category for both menu commands and tools. As a warning, they will be mixed in with all of the other legacy tools, but there are still some gems in there.
  15. Sorry, I'm super busy this week but will try to look at it if I get some time in the evenings.
×
×
  • Create New...