sully8391
-
Posts
45 -
Joined
-
Last visited
Content Type
Profiles
Forums
Events
Articles
Marionette
Store
Posts posted by sully8391
-
-
@JBenghiat The indents are from pasting. I eventually just had to make a new plugin and copy all the code and have ditched the external editor until I get more comfortable with Python in Vectorworks. I'm still getting strange errors, but this might have something to do with my windows machine. For example, I have one function that relies on converting a string to an integer. On my Windows machine I get "Error trying to convert string to number" (I have to use vs.Str2Num() first, because Vectorworks doesn't seem to like int()), but then it executes all the lines of code that require that conversion to happen. When I try this on my Mac, there are no errors. If I didn't have any ancient computer monitor and could use it with my Mac, I'd just ignore it for now, but I can't code and do CAD on a 13" screen.
-
I don't know VS, but it looks similar to a Python import function. Using that method, at least as I understand it, things are sort of working. I've set the environment path in "script options" to a folder containing my script, which includes a main() function. In the Vectorworks script editor all I have is this:
import Blocks Blocks.__main()
But there's a bit of code in the script that's broken now. Below is a simplification of what's going on. This works fine when in the Vectorworks editor but breaks in Sublime. Any ideas?
def __main(): valid, objN, objH, recH, nilx = vs.GetCustomObjectInfo() record = vs.GetName(recH) vs.Message(str(objH)) #this prints a valid Handle name = vs.GetName(objH) #but this tells me the handle variable is NIL
-
As I've read, it's possible to use an external text editor instead of the built-in one. I'd like to be able to keep a .py file open, save it, and have it automatically update in Vectorworks, and I'd think there would be a way to select a file to be referenced, but I can't figure out how to do this; I also haven't found anything useful on the developer page. When I navigate to the plugins manager there are .vso and .vst files with the names of plugins I've created, but if I try to open them in Sublime it's just a string of integers. How can I integrate a text editor into my workflow?
-
Restarting Vectorworks solved the problem, seems like even though I changed the language to Python, Vectorworks was still interpreting it as VectorScript.
-
@MullinRJ Weird, I just created a new tool, and it works fine. The first one keeps giving me this error no matter what. I did have it set to Vector Script initially, but fixed that after the first time I had the error, so I wonder if that has anything to do with it. No hidden characters. I'll have to see if a restart corrects it.
-
I have some simple scripts working already, so now I'd like to make those scripts into plugin objects or tools; I've been using Python for 2 or 3 years mostly within TouchDesigner and have written some pretty robust code, so I'm very comfortable with that side of things.
I think I could move one step forward if I just understood what this error is trying to tell me. Python is the selected language.
-
I'm trying to explore scripted Python plugins, but I'm having trouble finding any basic information on how scripts function within a plugin and interact with specified parameters.
For example, I've created a tool plugin and put in what I thought was the most basic script:
vs.Message('Test Tool')
When I click on the tool I get an error message: Identifier Not Declared.
What does this mean? I tried declaring a function and then running the function, but I get the same error, always on the first line; even /import vs/ will give me this error. Just looking for a place to begin experimenting.
-
I have a drawing label that seems to be in limbo. I know it somehow ended up in a class that it's not supposed to be in, but I've turned on every single class and still cannot see it. I've also tried making it appear using custom selection to no avail. Is there another way to grab this object?
-
I thought it might be a visibility issue, but it seems to be an issue with specific tools, the speaker tool and riser tool in particular. Looks like I just have to redraw the geometry for now.
-
Hi all,
I have a section viewport on a design layer that I'm trying to convert to polygons. I've done this for another section, and it was fine, but now for all the sections I try to make anything that is beyond the cut plane is deleted. "Display Extents beyond cut plane" is checked and render mode is hidden line. Any ideas?
Thanks!
-
Hi all,
I've been having issues with the speaker tool and the array tool. With the speaker tool every now and again every speaker will disappear. I have confirmed multiple times that they are not in a hidden class or layer, and we're talking 70 speakers in multiple classes on multiple layers, so accidentally deleting all of them at once is highly unlikely. I've tried re-importing the symbol and doing a custom selection. For now when it happens I just open a previous file and copy and paste the speakers in. Still wastes a lot of time getting all the speakers back to their correct position, but this only happens with point sources.
The array tool is special in its own way. I have my arrays on Braceworks hang positions, and when I change the trim height of the system, the bumpers will follow, but sometimes the speakers follow, sometimes they don't, sometimes they end up 20' higher than the bumper, and sometimes two arrays are fine, but then three others are completely out of whack, and I have to reconfigure or repopulate the arrays.
Am I doing something wrong, or can I be sure these are bugs?
Vectorworks 2020 SP3.1 (Build 537701)
Designer/Renderworks Educational
Windows 10 64bit
-
Hi all,
I'm about three months new to Vectorworks, and I use it mainly for theater as a sound designer, but I'm working on a project where I've designed a whole theater venue (i.e. lobby, stage, auditorium), and I'm struggling deciding how to separate these different spaces. I've made layers for the orchestra, mezzanine, and balcony, but these layers don't necessarily translate to floor levels across the venue. I'd also like to make view ports and sheet layers with just the lobby, but objects like doors, stairs, and slabs are are all in one class regardless of where they are in the venue, so there's no way to hide a whole portion of the venue by turning off classes or layers. I'm thinking I should a.) create separate layers for each space, e.g. lobby ground plan, lobby mezzanine, lobby balcony; theatre orchestra, theatre mezzanine; stage fly gallery, stage mid gal, etc., or b.) make parent classes for each part of the venue and class common items to the appropriate parent class, e.g. Lobby-Stairs, Theatre-Stairs, Stage-Stairs, etc.
Curious how other more experienced users would go about organizing such spaces. Hope the question makes sense.
Thanks!
-
This is fantastic! I was wondering if you could just wrap up some Python in a Marionette node. What's the correct way to do so?
Thanks so much!
-
Oh dear, this is what happens when I try to program at 4am. Okay, I see what's going wrong, but I'm having a hard time thinking of how to pull this off in Marionette. I know how I'd do this in Python:
x = 0 y = 2 for item in range(10): z = 1.68 * (abs(x-y)) x = y y+= z
But Marionette seems tricky when it comes to loops. Any tips or hints would be appreciated.
Thank you!
-
I'd like to use Marionette to make an array of rectangles over some distance with the distance between each rectangle increasing by phi. If I use this network to control the rectangle's width and height, it works perfectly, but when I try to use the output of the range as an input to the y value of the point, it doesn't work, the rectangles are just spaced out evenly.
-
Service Pack 6, build 522773
Licenses: Designer, Renderworks
-
Just dove into Marionettes today. I've used Python and visual programming environments pretty extensively, so it all feels comfortable, but I seem to have run into a bug. By force of habit, to cancel making a connection, I'll hit escape, the way you would cancel a polyline. This creates a disconnected cable that I can't interact with and will only disappear on saving. But it also completely screws up how the Object Info palette responds to selections, i.e. it doesn't; no object I select will populate the Object Info. The only way to fix this is if I right-click on the object, select "edit script" and just hit okay. But then the Object Info will be stuck on that object instead. Is this just a bug I have to live with til I update to 2020?
Thanks all!
Vectorworks 2019, Educational License
Windows 10
-
I see the note there now that they've been deprecated. I still find the VS Function Reference lacking. I've been at it hours, and I can't even get a simple dialog box with a button. The examples don't make much sense to me. I'm seeing functions defined inside other function definitions, and functions that seem to do nothing but define global variables. The comments are also sparse, so I'm just having a lot of trouble figuring out how these elements are supposed to work together.
-
Hi all, new to Vectorworks, but I've been using Python for a couple years and have used it a lot in TouchDesigner. I want to create a custom dialog box to collect user input parameters and then create a new symbol, but I'm lost where to even begin. I keep trying to run various dialog functions and then I get an error saying that they don't exist. example:
import vs vs.BeginDialog(0, 1, 10, 10, 0, 0) vs.EndDialog()
I get an error saying that vs has no attribute BeginDialog. Then I tried vs.DrawDialog(), thinking that would be a better place to start, and I get the same error. All of the class functions work fine, as well as the predefined dialogs, what am I doing wrong here?
Also, in general, are there any more extensive resources for the Python API? The VS Function Reference wiki page is kind of awful.
Using an External Text Editor
in Python Scripting
Posted
Update: Ignore people who code at 4:00 am. I found the real problem, and it actually was, in one execution of the function, attempting to convert a None to an integer. *infinite face-palm*
Apparently a Mac doesn't care to tell you and just considers it a 0. Fixed it with an if-then.