Jayme McColgan
-
Posts
196 -
Joined
-
Last visited
Content Type
Profiles
Forums
Events
Articles
Marionette
Store
Posts posted by Jayme McColgan
-
-
Heres how i achieved it running VW2020
### Tiles wide = 5 tall = 6 ### Tile PHY Size ledsize = 24 ### Texture Name ledtext = "Texture-2" vs.BeginXtrd(0, 1) vs.RectangleN (0, 0, 1, 0, (wide*ledsize), (tall*ledsize) ) vs.EndXtrd() last = vs.LNewObj() vs.SetTextureRefN(last, ledtext, 4, 0)
-
On 7/15/2021 at 3:45 AM, Sloader said:
Is this what you are looking for?
https://developer.vectorworks.net/index.php/VS:SetObjMaterialHandle
FUNCTION SetObjMaterialHandle( VAR objectHandle :HANDLE; materialHandle :HANDLE) : BOOLEAN;
this seems to only be in 2021 version.... still rocking 2020.
-
hey guys,
so I'm having some trouble assigning a texture to a 3d polygon thats being created in a PIO... ive got color working using vs.SetFillBack but i can't figure out what to use to apply a texture to the surface...
ANWSER:
### Tiles wide = 5 tall = 6 ### Tile PHY Size ledsize = 24 ### Texture Name ledtext = "Texture-1" ### Build Extrudged Rectangle vs.BeginXtrd(0, 1) vs.RectangleN (0, 0, 1, 0, (wide*ledsize), (tall*ledsize) ) vs.EndXtrd() ### Assign Texture to extrude last = vs.LNewObj() vs.SetTextureRefN(last, ledtext, 4, 0)
-
17 hours ago, Hippocode said:
Yes this is only possible using the SDK. You could create a small SDK project that runs a specific python script on startup or any other event if you don't want to bring over the full script.
hmmm I'll have to look into this.
-
8 minutes ago, Jesse Cogswell said:
To get the handle to the PIO, you will want to use vs.GetCustomObjectInfo().
you sir win a cookie! thank you
-
thanks! this helped me a lot! I'm almost successfully made my first PIO with parameters!
the only real issue i have right now is when i insert it from the tool set, i get a "HANDLE Variable is NIL"... I'm using vs.FSActLayer() but obviously thats not what i should be using... any advice with what i should be using to get the handle of the PIO would be great.
-
hey guys,
a few questions on understanding how plugin objects work...
so i've made a plugin (via the plugin manager) and I'm trying to understand how to interact with it.
- when i insert a plugin object from the tool set does it run the whole script?
ANWSER:
yes when you insert a PIO it runs the whole script based on how you have it laid out
- if i have made parameters for my plugin object, does it run the whole script if i change any of the values?
ANWSER:
Yes, when you update a field parameters it reruns the whole script
- how do i actually get the value of the parameters after changing them? i've tried vs.GetObjectVariableHandle (and the various version of that) and doesn't seem to be working.
ANWSER:
def collect(): ### Get PIO Info PIO_handle = vs.GetCustomObjectInfo()[2] recordHandle = vs.GetParametricRecord(PIO_handle) recname = vs.GetName(recordHandle) ### Pop Up Field product = str(vs.GetRField(PIO_handle, recname, "Drop down choices")) ### Interger Field how_wide = int(vs.GetRField(PIO_handle, recname, "Tiles Wide")) ### Dimension Scientific notation to inches stupid = vs.GetRField(PIO_handle, recname, "Length of object") dem_length = vs.ValidNumStr(stupid)[1] return(product, how_wide, dem_length, PIO_handle, recname)
-
hey guys,
wondering if its possible to have a plugin run when i start vectorworks or when i open a drawing. either will work.
-
ok so i have a few more questions about some things i can't find.
what should i be using to set the Z height of a symbol?UPDATE: solved this.
vs.Symbol(symbolName, x,y , -22.5) last = vs.LNewObj() vs.Move3DObj(last, 0, 0, 180)
what should i be using to get the symbol type? the name that is just below class and layer. (normally its polyline, focus point, 2d/3d object, ect.)
can i inset a symbol from a drawing thats in my favorites folder?
this one is more of a general python question but i need to find the length of the side of a 90º triangle only knowing the length of 1 side and 2 of the angles. ive tried what i though was correct but doesn't seem to come up with the right answer... ive attached a picture and the code i tried for reference. in the image I'm trying to find the length of the A side.
import math angle_a = 22.5 b = 56 a = b * math.tan(angle_a)
-
@Tobias Döngi so what is the handle parameter the first function is referencing? is that what is currently selected?
-
so i've been using Vectorworks for a few years and decided to make some python scripts. i understand python but i've having a hard time getting off the ground. i've made some basic scripts but I'm ready to start making useable ones now...
what i want to do is to select some objects and get some basic info about them (location, size, ect.) and add some symbols based off the positions of the selected items. I'm stuck on step one of looping through the selected objects.
any help would be appreciated.
Solution:
OBJECTS = [] def start(): vs.ForEachObject(collect, '((VSEL=TRUE))') def collect(handle): ### Get Selected PIO Record name hrecdef = vs.GetParametricRecord(handle) recname = vs.GetName(hrecdef) if recname == "Focus Point Object": fpoint_info = [] fpoint_x, fpoint_y, fpoint_z = vs.GetSymLoc3D(handle) fpoint_rot = vs.GetSymRot(handle) fpoint_info.append(handle) fpoint_info.append(fpoint_x) fpoint_info.append(fpoint_y) fpoint_info.append(fpoint_z) fpoint_info.append(fpoint_rot) OBJECTS.append(fpoint_info)
-
@markdd yeah everything runs fine, but i would expect more out of a 12 core 2 GPU machine...
-
hey guys,
so i just got my hands on a 2013 Mac Pro(12-Core Intel Xeon, 2 FirePro D700 6 GB, and 64gb of ram) and my 2018 baseline macbook pro seems to out perform it... is there anyone still using a 2013 mac pro. Has VW just moved past hardware from 2013? i can never remember what part of the system VW uses the most. Does it help that the mac pro has 2 graphics cards? does the 12 core Xeon help or hurt it? does VW2020 prefer clock speed over core count?
my main workflow is Spotlight and occasionally OpenGL/renderworks.
thanks guys.
-
Thanks guys, ill do the vision request
-
-
hey guys,
whats the proper way to get a fixture added to the fixture mode library database? need them to use vision for a previs show.
Ovation B-1965FC
https://www.chauvetprofessional.com/products/ovation-b-1965fc/
Ovation B-565FC
https://www.chauvetprofessional.com/products/ovation-b-565fc/
-
-
11 hours ago, markdd said:
Check the class assignments in Spotlight Preferences.
what exactly am i looking for in there?
-
Hy guys, i have assigned a class to the a lighting fixture on the "Edit symbol options..." menu and when i go to add my symbol to a drawing it brings it in as the active class layer. does anyone know a way around this?
-
Hey guys so I'm currently updating all my custom fixture symbols for 2020. Is it possible to assign a Default Fixture Profile? Ive tried adding the Fixture mode to the Light info record and that didn't work.
any ideas?
Best way to rotate around a circle...
in Python Scripting
Posted
so I'm working on a plugin that creates a symbol and then rotates it based on a degree making a consistent curve. i've gotten a version working but only if i know the diameter of the circle the curve is based on... my question is if the user puts in a angle of 6 how do i dynamically find where to rotate the symbol from?
heres a code used to make what I'm looking for. this picture is based off already knowing the size of the circle... i've also attached a picture of what I'm trying to achieve.