Jump to content

Jayme McColgan

  • Posts

  • Joined

  • Last visited

Posts 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. 55 minutes ago, JBenghiat said:

    This depends on the type of object, which is easier if you’re intentionally creating objects for export. 

    The only object that gives you actual vertices is a mesh. If the objects are extrudes, you need to get the points off the planar base, the do the math to get the vertices in space. If it’s a generic solid, it can’t be done. 

    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!

  3. 15 hours ago, JBenghiat said:

    Check your path. File paths are usually relative to the script location, unless you use absolute paths (i.e. c://… or \Users\…)


    Possibly the file won’t actually appear on disk until you call EXL_SaveAndCloseBook()

    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.

  4. 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... 

  5. 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)

  6. 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

  7. 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... 





    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



  8. 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. 

  9. 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.

  10. 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! 🙂

  11. 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. 

  12. 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

  13. @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? 

  14. 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. 

  15. 4 hours ago, Pat Stanford said:

    That is an actual number, but it is being displayed as scientific notation. 1e01 is one way of writing 1 x 10^1 = 1 x 10 = 10 feet. 


    But I know that is not your real question, which is how do you format it as Feet and Inches.  For that we probably need some sample code to work from. It should take the display format from the Document Unit Settings. If that is not set to scientific notation I don't have any other good ideas.


    Other than I have never seen this problem with Vectorscript. 😉

    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!

  16. 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? 




    length_sci_note = vs.GetRField(PIO_handle, recname, "Length from Shackle")
    length = vs.ValidNumStr(length_sci_note)[1]


  17. 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.

    Screen Shot 2021-08-04 at 9.01.43 PM.png

  • Create New...