Jump to content

Jayme McColgan

  • Posts

  • Joined

  • Last visited

Everything posted by Jayme McColgan

  1. hey guys, this year is the first year that i have developed plugins for VW and I'm curious to know the process of getting plugins ready for new releases. i have about 10 plugins that i've made that i will need to move from VW2020 to VW2022. also wheres the best place to see whats new (in regards to plugins) with the new version.
  2. @twk i can't use bounding box because i need the actual geometry polys. i've worked it out. will post a sample after i work some kinks out.
  3. so i've made some great progress with vs.ConvertTo3DPolys() and vs.GetPolyPt3D() to convert whatever selected symbols to polys. seems to be working great. ill post some source code once i work out a few kinks!
  4. lets say i have a 1'x1'x1' cube, i need to return the x,y,z of all the corners of the cube so i can format it to a .txt file to send that to another program. my goal is to achieve this for more detailed objects in the future.
  5. the file path was correct and i tried with both vs.EXL_SaveAndCloseBook() and vs.EXL_CloseBook() with no success. i ended up using an external python module to achieve what i wanted since it works with VW2020 as well.
  6. yeah i ended up just using the xlsxwriter module and it works great.
  7. started playing around with VW2021 (were currently on 2020 at work) and the new excel functions. i cant get it to work. the vs.EXL_NewBook() function claims it worked (by returning a True value) but nothing is actually created... I'm trying to automate the kinda labor intensive process of creating a lighting patch sheet and step 1 is it creating an excel sheet that i can format...
  8. ok so ive moved onto making popups with widgets and i have some questions... I'm using vs.vsoInsertWidget() and vs.vsoWidgetPopupAdd() to make some popups that hidden by default. they then appear and disappear based on the value of a standard Parameter popup... the questions i have are: 1. how do i get the current value of the WidgetPopups? 2. how do i set a default value for the WidgetPopups? using vs.SetRField() doesn't seem to work (im assuming because its a widget)
  9. yes! vs.ResetObject() was exactly what i was looking for! that fixed my issue. events and widgets are very cool and I'm already finding some cool ways to use them. if anything just being able to have a full width separator for the different sections really helps my OCD. lol because you can't really use vs.EnableParameter() while using widgets, my next thing to figure out is how to insert and change drop down options based on other fields in the OIP
  10. started working with widgets this week... kinda frustrating NGL. lol i've overcome most of the issues I'm having but the main one is i have some button widgets that open a color picker to change the color of some items in my PIO. that works great but whenever I'm done picking a color it spawns another version of my PIO at (0,0) but its not a PIO, its just all the objects the PIO normally creates but not all individual pieces. I'm sure its something stupid in my code... the thing thats causing it is when i run the "mainloop()" after it processes the button but i don't know why its causing the issue... SOLUTION: when using event based plugins you should only be running your main code during ResetEvents. Don't trigger your main loop after your button login is done, instead run vs.ResetObject() and that will act as if something was changed in the OIP. thanks @JBenghiat def start(): ##### Correct use ###### if theEvent == kObjOnObjectUIButtonHit: if theButton == buttonID_1: ### Code for when your button is pressed.... vs.ResetObject(PIO_handle) ### <----- Good ### ##### incorrect use ###### if theEvent == kObjOnObjectUIButtonHit: if theButton == buttonID_1: ### Code for when your button is pressed.... main() ### <----- bad ### def main(): ###main loop for building your stuff return None
  11. yeah that workflow is basically what i have in place now. some of my motivation to work with the SDK is to keep learning more and building my skillset. ill come back to it at some point after i have a far better understanding of building plugins. i still have a few challenges to overcome with a few of my preexisting plugins.
  12. ok i've made some great progress! 🙂 I'm using vs.Line(), vs.LineLineIntersection(), and some math to draw 2 lines and get the pivot point of the arc. its close but still has some issues... the main issues I'm having is vs.RotatePoint() only seems to be working if I'm in a top view... if i have any offset angle (using the flyover tool) it seems to follow the way the camera is pointed.... I'm also having some weird issues when curving negative but i think that has to do with the symbol I'm using.
  13. i had this going in the python forums and no one seemed to have a reasonable solution. it would be nice to have a VS command that would allow me to create a symbol folder into a already existing folder. a similar function to vs.InsertSymbolInFolder() would be ideal! this is important to me as i tend to store imported symbols in folder inside a "plugin symbols" folder instead of just dumping everything in the root... helps with orgininzating and it helps stop people from messing with the plugin symbols. out of sight out of mind! 🙂
  14. thanks @Vlado ill get an email chain going later this afternoon. got a few projects to finish first. thanks for the help!
  15. the script is a serial license checker and a logger for which serial is in the drawing a certain time. it basically just needs to make a http call(with a few args) to an external web server if it has an internet connection. i have this currently built into all my plugins but i think it would be lighter and faster to have it running as a background task when a cad opens and then every few minutes after that.
  16. morning y'all, so i've been writing python plugins for a little bit and i got a pretty good handle on that... i'm looking to make a small SDK project that runs a python script at startup and every 5-10 mins after that i have no idea where to start with using the SDK... i downloaded the sdk and looked around but im at a loss... lol
  17. @Vlado when you say "consist of bundling all .pyc files into the vsm, vso, or vst files" what exactly do you mean by this? I'm having some issues getting my plugins with external scripts to work properly. the workflow i've tried already is putting the .vso file and all the required .py files in a folder, building a .xml file pointing to all those .py files and using vs.EncryptPlugin(). It claims it ran with no issues and the plugin is indeed locked but when i transfer the encrypted .vso to a new computer it says the scripts are missing. what am i doing wrong?
  18. yeah thats what I'm currently doing, just would be nice for it natively happen!
  19. currently when using vs.symbol() to make or inset symbols, it returns None but it would be nice if it could return the handle of the thing it created. actually anything that is being cerated would be super cool to have the handle returned from it.
  20. is there currently any roadmap to move to a newer version of python to use with programming? there's a lot of modules and basic python things (like using F string) that are included with versions grated then 3.5 that would be very helpful.
  21. i have been meaning to take a look into the SDK and see what i can use it for. i've been thinking of moving my license key checker to the SDK so it can run every so often instead of it being at the beginning of every PIO i make... maybe one day. also want to move my auto plugin update to some sort of background task instead of it being a menu command. got some people at work who really slack at keeping up to date with plugins and such.
  22. one day you will come to the dark side! don't be scared just because our code based shares the name with a snake! lol *hiss**hiss**hiss* thanks for all the help @Pat Stanford as i try and wrap my head around the VW Scripting workflow!
  23. looking to figure out how to convert the value of a Dimensions field. if i put in 10'0" in the print out is "1e01". how do i turn that into inches? ANWSER: length_sci_note = vs.GetRField(PIO_handle, recname, "Length from Shackle") length = vs.ValidNumStr(length_sci_note)[1] vs.AlrtDialog(length)
  24. ok so i had to look at it again because i was starting to confuse myself... what i ultimately need is not really VW related but math related... lol if i have a known constant of 10 degrees and i know the object I'm trying to rotate is 500mm wide or 19.68503937 inches (because plugins only work in inches...) how do i find out where to place the pivot point of the imaginary circle these are moving around.
  • Create New...