Naos Posted October 13, 2017 Share Posted October 13, 2017 Can someone point me in the right direction? I would like to create a symbol similar to the revision marker. The symbol would be able to be modified in the Object Info Palette. Will I need to learn how to write a script to create this object? Thanks! Quote Link to comment
Urbanist Posted October 13, 2017 Share Posted October 13, 2017 Modified in what respect? Unfortunately there are few learning resources, but you should have a look at the examples here http://www.vectorworks.net/support/custom/vscript/example Also you might ask the same in the Marionette section. People using M may be more forthcoming and helpful than Vectorscripters and I understand that there are learning resources for M. 1 Quote Link to comment
Pat Stanford Posted October 13, 2017 Share Posted October 13, 2017 This sounds like a perfect task for Marionette. Can you post an example of what you would like the object to look like an what options you would like to have in the OIP? We can probably have a simple prototype running tomorrow. 1 Quote Link to comment
Naos Posted October 13, 2017 Author Share Posted October 13, 2017 Thanks! Vscript looks like a good space to start. We are still using VW2013, so I don't have access to Marionette. Quote Link to comment
Naos Posted October 13, 2017 Author Share Posted October 13, 2017 9 hours ago, Pat Stanford said: This sounds like a perfect task for Marionette. Can you post an example of what you would like the object to look like an what options you would like to have in the OIP? We can probably have a simple prototype running tomorrow. Quote Link to comment
Pat Stanford Posted October 13, 2017 Share Posted October 13, 2017 OK, Here is a sample Marionette object doing what you want. The Object Type will be Marionette Object with the DOOR TAG name being shown lower in the OIP. Let me know if you need help in deciphering what the various steps in the network do. Marionette Door Tag.vwx 2 Quote Link to comment
Pat Stanford Posted October 13, 2017 Share Posted October 13, 2017 To do it as a Vectorscript you will need to create a Plug-In Object. I recommend that you start with just a script that will draw the oval and the text. Once that is working you can move that script to the Plug-In Editor and add the Parameters that will be displayed in the OIP. Here is the basic script to draw an oval and a block of text centered in the oval. Procedure Door_Tag; {October 13, 2017} {© 2017 Patrick Stanford pat@coviana.com} {Licensed under the GNU Lesser General Public License} {Demo Vectorscript code to show how to draw an oval with a text block centered on the oval} {No warranty expressed or implied. Use at your own risk. Here there be dragons. Use of Vectorscipt may be addictive} Const pDoorTag = '101'; pScale=2; Var X1,Y1,X2,Y2,X3,Y3: Real; H1: Handle; Begin OvalN(0,0,1,0,20*pScale,10*pScale); {Draw an oval at a starting point with a size given by last two parameter} H1:=LNewObj; GetBBox(H1,X1,Y1,X2,Y2); {Get the corners of the bounding box of the oval} X3:=(X1+X2)/2; {Calculate the center of the bounding box} Y3:=(Y1+Y2)/2; MoveTo(X3,Y3); {Move the insertion point to the center} CreateText(pDoorTag); SetTextJust(LNewObj,2); SetTextVerticalAlign(LNewObj,3); End; Run(Door_Tag); To convert this into a Plug-In Object, first read the VectorScript Language Guide available from this page http://developer.vectorworks.net/index.php/VectorScript Then copy the script from above and paste it into the Plugin Editor, delete the Const section and then in the Parameters section add Parameters named DoorTag and Scale, the "p" before them later in the script will then use the parameters you enter. The first time you create the object in the Plugin Editor, you will then need to edit your workspace to add the tool that will insert the object. Write back when you are ready for more information. 3 Quote Link to comment
Pat Stanford Posted October 13, 2017 Share Posted October 13, 2017 @Marissa Farrell@domc My Marionette solution is probably really rough. Any pointers on how to improve. One caveat. Only stock nodes. None of your fancy schmalzy custom nodes. If I have to go that far I will just to to VS. ;-) Quote Link to comment
Marionette Maven Marissa Farrell Posted October 13, 2017 Marionette Maven Share Posted October 13, 2017 Honestly, @Pat Stanford, this looks like it would be my exact approach. EDIT: You are, however, inspiring me to create some alignment nodes, since I don't think we have any. 1 Quote Link to comment
Pat Stanford Posted October 13, 2017 Share Posted October 13, 2017 2 hours ago, Marissa Farrell said: Honestly, @Pat Stanford, this looks like it would be my exact approach. Dang, I was really hoping I was missing something that would have made it much simpler. 21 nodes to 17 lines of VS. And that is counting the Procedure, Run and Begin/End statements. Align Statements in VW2019 would be good. As would some "Math on Points" nodes to avoid the GetXY and Point 2D conversions. As would a generic "Get Point" and Point conversion so that you could use a single node for both XY and XYZ conditions with at least the Z being optional. Thanks. Quote Link to comment
Urbanist Posted October 14, 2017 Share Posted October 14, 2017 13 hours ago, Naos said: 13 hours ago, Naos said: If you need to edit only the tag text perhaps a symbol with text linked to a record field would do, but I agree that going to the data tab is clumsy. However, one can edit the data in a report, which has advantages as comes to systematising and normalising data. 1 Quote Link to comment
Pat Stanford Posted October 14, 2017 Share Posted October 14, 2017 Parameter records from a Vectorscript (or Python) PIO can also be reported and edited in a worksheet. I have not tried to pull Marionette data into a worksheet. Guess I'm not going to bed yet after all. ;-) Quote Link to comment
Urbanist Posted October 14, 2017 Share Posted October 14, 2017 (edited) 7 hours ago, Pat Stanford said: Parameter records from a Vectorscript (or Python) PIO can also be reported and edited in a worksheet. Indeed one can, shame if not from M objects. However, my point was that if the needs can be met using the built-in functionality, one should not create a PIO. I believe that most users do not know how to create database driven tags in symbols. The simple solution to the issue at hand would be that the Object Info would remain in Data tab mode, either as default (ie. in the last explicitly selected mode) or via an option. The report is a workaround of sorts, but not unproblematic, of course. One of the problems with parametric objects that the programmer can very easily get the serious disease called featuritis and a small and simple scripting job, which produced a working tool as a matter of hours, becomes a project taking weeks. In the case at hand, there might be a need to use a user-defined symbol as the graphic, add a leader line of a certain style and so on. An ideal door tag would be associated with the door in question and be able to query & display its parameters. (Did I mention featuritis?) Edited October 14, 2017 by Urbanist Typo fixed 2 Quote Link to comment
Marionette Maven Marissa Farrell Posted October 16, 2017 Marionette Maven Share Posted October 16, 2017 So with my new align node, the network can be reduced to 10 nodes. I'll work on getting permission to add the newly suggested nodes to VW in the future. I know this doesn't help @Naos because he's still on 2013, but I did want to share anyhow. On 10/13/2017 at 5:55 PM, Pat Stanford said: As would a generic "Get Point" and Point conversion so that you could use a single node for both XY and XYZ conditions with at least the Z being optional. @Pat Stanford, you can use the XYZ nodes and skip the XY nodes. I think they were both created in hopes of reducing confusion, but if you wire an XYZ node to a 2D point port, it will only use the XY portion, unless I'm misunderstanding. Marionette_RevisionMarker002_MFarrell.vwx EDIT: You can do math on points just like this: 1 Quote Link to comment
Pat Stanford Posted October 16, 2017 Share Posted October 16, 2017 I will try it again, I started with the XYZ nodes and it told me it would not accept an undefined value (or something like that, it was 5 days ago) when I tried to leave the Z blank. You math on points does work, but does not do what you need to center things where you need to add in one direction and subtract in the other. Quote Link to comment
Marionette Maven Marissa Farrell Posted October 16, 2017 Marionette Maven Share Posted October 16, 2017 Why not add a negative value? That would work. Quote Link to comment
Pat Stanford Posted October 16, 2017 Share Posted October 16, 2017 Still can't do it that way. I was thinking of Adding the X values and Subtracting the Y values. You would still need to add a bunch more need to convert just one value to negative. Quote Link to comment
Marionette Maven Marissa Farrell Posted October 16, 2017 Marionette Maven Share Posted October 16, 2017 Under what circumstances would you do that? I'm eager to find a solution... Quote Link to comment
Naos Posted October 16, 2017 Author Share Posted October 16, 2017 1 hour ago, Marissa Farrell said: So with my new align node, the network can be reduced to 10 nodes. I'll work on getting permission to add the newly suggested nodes to VW in the future. I know this doesn't help @Naos because he's still on 2013, but I did want to share anyhow. @Pat Stanford, you can use the XYZ nodes and skip the XY nodes. I think they were both created in hopes of reducing confusion, but if you wire an XYZ node to a 2D point port, it will only use the XY portion, unless I'm misunderstanding. Marionette_RevisionMarker002_MFarrell.vwx EDIT: You can do math on points just like this: Thank for your input. We have one 2016 license and we need to upgrade everyone's workstation soon. I'm looking forward to trying out Marionette and wrapping my head around scripting. Quote Link to comment
Nuwach Posted January 29, 2020 Share Posted January 29, 2020 Hello, I am in state of researching what software for me to “land in”. I come from rhino+grasshopper-revit workflow, and finding vectorworks as such promising compact yet complete workflow from design concept to BIM stage. Right now i hardly find vectorworks create custom object such windows and doors as we do in revit family creation. My question is can we create this parametric object in vectorworks? Do i need to have coding skill to make this? Many Thanks Ardillas Quote Link to comment
LarryO Posted January 30, 2020 Share Posted January 30, 2020 @Ardillas Nuh You might get a more informed response by posting your question in its own thread, but I'll give it a try. My question is can we create this parametric object in vectorworks? Yes parametric objects can be created in VWs. Windows and doors already exist as parametric tools and can be placed into walls. These are 3d objects. If you require additional functionality that is not available in the current window or door tool, you can create your own parametric tool. Whether the effort is worth the investment depends upon the frequency your office intends to utilize the custom door or window. The best and most flexible parametric objects are created using code but simple scalable symbols (blocks) are also an option. And while dimensions can be linked to objects and utilized to reshape them, the functionality is not the same as Revit where dimensions are utilized as constraints to create reusable parametric models that are commonly exported as library files. Contact your local VW sales to get a 30 day trial and explore the options. Quote Link to comment
Nuwach Posted January 30, 2020 Share Posted January 30, 2020 @LarryO Thank you for the respond. Any tutorial to make custom parametric object? I want to know how vectorworks user handle custom profile doors and windows. Right now i am digging information about this while using vectorworks trial license ☺️. Quote Link to comment
Pat Stanford Posted January 31, 2020 Share Posted January 31, 2020 Whether you need coding skills or not depends on how custom you need your objects to be. VW Doors and Windows are fairly flexible. You can use Object Styles to create a "prototype" of a door or window that will allow the user to modify certain settings while others are locked down. I have not used Revit, but my understanding is that this is a similar idea to what a Family is. If you need to make objects that are not possible using the standard Door or Window objects you have two options. Both the Door and Window have an option to "Use Symbol Geometry". This allows you to basically draw anything that you want and stick it inside a Door or Window object so that all of the standard reports and record data are available as if it was any other object. But you have to make sure to enter the correct data. This works well if you have a single (or a few) special doors in a project. If you need to basically have all the doors/windows in your project be something not easily handled by the standard tools/objects, then you probably want to learn to code in either Marionette (like grasshopper) or VectorScript/PythonScript and create your own objects that will do exactly what you want. Ask again (probably in a fresh thread) if you need more information. Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.