Jump to content

Jayme McColgan

  • Posts

  • Joined

  • Last visited

Everything posted by Jayme McColgan

  1. hey sam, yes this way works but ONLY if you're creating all the folders you need at one time. i cant do that... this folder will have several folders in it as various plugins are ran and need to import/create symbols. a long winded way that i havent tried yet seems like was talked about above is to get all the items in the main folder, give that a temp name, make a new folder with the correct folder in that and then use InsertSymbolInFolder() to move everything and delete the old folder... id ranter not do this as it sounds like theres A LOT of room for error and no one like high margin of errors... lol i will check back in if i come up with anything.
  2. working on a plugin that will inset some symbols that have i have previous made into lighting devices. when i use vs.symbol() to add them to my drawing it adds them as just symbols instead of lighting devices. any way to add a "lighting device" to a drawing or to convert a symbol to a lighting device?
  3. SetParent doesn't work. i tried it a few different ways with no luck, also there's a remark on the SetParent function page that says
  4. hmm sadly thats not really an option... this is for a curved wall feature I'm adding to my LED Wall plugin and the only interaction the user will have is a parameter field that they input an integer into.
  5. i have a script that makes a folder and imports some symbols in it... id like to take that freshly made folder and its symbols and put them in another already existing folder (for organizing sake). anyone done anything like this? vs.InsertSymbolInFolder() doesn't seem to work for folders Side question: is it possible to get the handles or names of everything inside a symbol folder in the current drawing?
  6. 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. tile = "Symbol-1" cur_width = 0 cur_angle = 10 vs.DSelectAll() for i in range(10): vs.Symbol(tile, -9.842519685, 1.289, 0) last = vs.LNewObj() vs.RotatePoint(0, 109.921, cur_angle) vs.Move3DObj(last, 0, 0, 0) cur_width = cur_width + 19.68503937 cur_angle = cur_angle + 10 vs.DSelectAll()
  7. 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)
  8. this seems to only be in 2021 version.... still rocking 2020.
  9. 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)
  10. 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.
  11. 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)
  12. hey guys, wondering if its possible to have a plugin run when i start vectorworks or when i open a drawing. either will work.
  13. 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)
  14. @Tobias Döngi so what is the handle parameter the first function is referencing? is that what is currently selected?
  15. 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)
  16. @markdd yeah everything runs fine, but i would expect more out of a 12 core 2 GPU machine...
  17. 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.
  18. Yes I did find that Last night and it worked. Forgot to post about it. Thanks!
  19. 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/
  20. ok i tried that and the Fixture mode still isn't filling based off the record i created. i've attached a screen shot of how i have it setup to make sure i did it right.
  21. 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?
  • Create New...