Jump to content

twk

Member
  • Posts

    877
  • Joined

  • Last visited

Everything posted by twk

  1. So.. further to this threads discussion, I had an idea for this problem from another thread ( https://forum.vectorworks.net/index.php?/topic/45875-evaluating-if-a-variable-has-changed/ The idea was to add a custom widget to the plugin using : result = vs.vsoAddWidget(widgetID, widgetType, locName) WidgetTypes: kFieldLongInt = ; kFieldBoolean = ; kFieldReal = ; kFieldText = ; kFieldCalculation = ; kFieldHandle = ; kFieldCoordDisp = ; kFieldPopUp = ; kFieldRadio = ; kFieldCoordLocX = ; kFieldCoordLocY = ; kWidgetButton = ; kWidgetStaticText = ; kWidgetDisclosure = ; ..and using the widgetType = 4 (Text) The problem is, as @JBenghiathas mentioned, is that there is no way to get values from these added/inserted widgets. Does anyone know then, what these Widgets are used for then? ( @Pat Stanford, @orso b. schmid, @Dieter @ DWorks, @Hippocode, @GioPet, @MarissaF), sorry just tagging people who've helped me in the past . Tagging you Marrisa because this happens in Marionette as well, with Text Parameters for Marionette Objects. Cheers
  2. Thanks @JBenghiat, Tried calling vsoStateGetParamChng( PIHan, widgID, prmIndex, oldValue ) and adding widgID, prmIndex, oldValue to the AlrtDialog, but the result is: widgID = 9001 {just the one i chose for examples sake} prmIndex = 0 OldVal = ' ' {nothing is displaying here} Could you post an example of what you're saying please. Thanks again
  3. Wow, thanks for this @JBenghiat, never understood events properly till this nicely laid out code. I don't mean to hijack this thread, but I'm sure this question is related and will help others. Once you add a parameter from your script, using ,for example: result = vsoAddWidget(kParamText_ID, kCustomParam_text, "Widget Text") how would you then grab data that's entered into this custom parameter widget? I tried GetRField in the main reset block of code, but nothings coming up (Created a text object that displays whatever string is in here) Thanks in advance
  4. Thanks for the input guys, so far so good, following Josh's advice. 1. Have set up a plugin parameter as static text: __xypts; and generated xyz coordinates from the pio and stored it in this static text parameter. 2. Setup a the pio to draw a text object containing data from this hidden static text parameter, and all the data is getting read out beautifully. can't really go into what the pio does at the moment, but as you can see from the screen shot, all coordinate data is getting displayed from the hidden parameter. Characters I assume are well over 256. This is using the vs.GetRField call and not the P<parmaname> method.
  5. No limit! very interesting, shall trial it out when at pc. Thanks Josh
  6. Greetings, Anyone know the maximum size of characters a Parameter/Record field can hold? Needing a place to store a series of xyz co-ordinates from a user-defined polygon. And thinking to store it in a static text parameter of my pio. There's no way to foreknow the number of vertices as its userdefined. But the location of each vertex is crucial to my calc. Thanks
  7. Hi Josh, We've also just finished a sub division project ~60 houses. And have set it up as you have described. One master file that has the site layout and then viewport referencing in all the floor plan types and duplicated viewports in the master file where necessary. We've had to keep an eye on the main file size as well. A couple of tips: 1. In your references tab, under the Organisational dialog set each file to not be cached (more loading time during opening but keeps the main/master file size down) 2. As @Tom Klabermentioned, purge unused resources. Purging redundant textures has seemed to help us alot. Cheers Tui
  8. Hi @JimWcan you please forward this to the relative technicians as I am beyond understanding how to submit this as a bug through the official channels. Also any errors from this make it impossible to develop plugins in python as it actually stalls the main Vectorworks program from working with the plugin anymore, until a restart. Thanks
  9. twk

    vs.GetPt()

    Yea I don't get it either. The only way to manipulate that 'pt' value is to do it within the callback function. Well in my testings anyway. HTH
  10. The scope of each module (main/demo/shapes) are limited to its namespace. Global variables defined in 'main' are still restricted to main even if its imported. The x's and y's you're referring to in the shapes.py module are not getting to x and y in the main module because of this. Also everything Josh mentioned, ie, the only reason you'd be separating files etc. more here: http://www.python-course.eu/python3_namespaces.php
  11. Probably won't work with Python. From the Description on the DevWiki http://developer.vectorworks.net/index.php/VS:AngleVar "Sets the angle designation method in 'Vectorscript'.." I believe that explains it. Looks like this function is Vectorscript specific. Funny that it has a equivalent Python function.
  12. Hi @Will, thanks for your feedback. That snippet in the debug window : vs.Ptitle_cust = 'Ground Floor Plan '' Was NOT written by me. When setting up parameters for a plugin in the VW Plugin Editor, whatever parameter name you specify, in the background, VW will store it as variable with an extra 'P' in front of it. example: - I set a parameter name in the Plugin Editor as 'title_cust' with a default value of 'hello'. - In the background VW stores whatever value that's assigned to this parameter in a variable called vs.Ptitle_cust = 'hello' This is further discussed by others here : https://forum.vectorworks.net/index.php?/topic/42954-python-newbie-retrieving-parameters-from-oip/
  13. @Dieter @ DWorksgreat share!.. I may have opened my mouth too soon about contributing, seeing the VW2017 has just been released, our office is gearing up for the release here in NZ, and I'll be setting up the new templates etc. What I had wanted to share though were mainly methods I had done for the Polygon methods, and some attributes that I've setup in our own library that could be used in the DLibrary opensource (attributes were open/closed,clockwise,vertexXY,vertexType etc. I tried pulling a fork using PyCharm but I'm having trouble setting up the bitbucket plugin for PyCharm. Will try again and post back.
  14. Good to hear @JimW.. Will try and have a go at it next week. Too many projects on at the moment And sorry for hijacking your thread @MarissaF. I shall stop now .. The Marionette video is surely promising for what's ahead
  15. This is definitely needed. We've been developing one in office, but it really needs to be a native feature. +10
  16. https://forum.vectorworks.net/index.php?/topic/44990-syntaxerror-eol-while-scanning-literal/ Apparently it's a Vectorworks Python API bug. Can we please have this fixed, as after this error occurs you cant get rid of the error until you restart Vectorworks
  17. Hi Dieter, are you still planning on an opensource-type library? As I would like to start contributing for the next vw2017 release. I feel a bit more comfortable now with Git and OOP. cheers
  18. Hi @Dieter @ DWorks, to where would we submit these bugs? Is there a different portal? or just on this board? I'm hesitant to post it here as its an API issue. @JimWthoughts?
  19. Even though it hasn't been released in NZ yet, the release looks great. At least it gives us time to plan/brain storm on a new Template style. Congrats VW Team
  20. Hi Alan, you could try the trial version at http://www.vectorworks.net/trial/ . And use US, and dummy phone/zip code numbers? I remember doing this for version 2015. For I had tried using NZ and it said it wasn't available yet. Meaning, because the actual version wasn't ready, the trial version isn't. @JimW/ @MarissaF; what are the legalities of doing these? Please delete this post if it's breaking any laws :D.. I think the reality is, it's true there are reasons why other areas get released later than others because of local features etc., however most of us are pretty much VW enthusiasts and it would be nice for at least a trial version for everyone.
  21. So good to see that in the VSS page.. so we can disclose all features now?
  22. Good eye Alan Yes, you're correct. However I couldn't use the actual marionette object inside that particular project file. It's a project sharing file, (the first one we've tried in office), and there are a multitude of bugs in using it. Not enough though to abandon project sharing altogether though, as Project Sharing was absolutely pivotal in getting multiple users in our office to work on the same project efficiently. I'd love to do a write up in the future on the pros and cons/our experience in using project sharing; but thats if this building boom ever recedes. For the voronoi script to work I had to strip out all the vonoi code in that Marionette node, and run it in it's separate script. Then again, it took me a good while to install the 'numpy' and 'scipy' external python libraries to work with Windows 10 x64. (I will try to do a post on this later). In the end finally got it to work after jumping through so many hoops. (This is not because of Vectorworks, its Python33 and Windows 10 x64).
  23. Would be great if we could have the search feature coming in the new Resource Browser for 2017, available for searching for classes/layers and toggling there visibilities and active statuses. Below are some screenshots of where it could be put, but basically the ability to search for any element (classes/layers/viewports) becomes a much needed feature. I've developed a menu plugin that does this for classes(demo below), but we need this across the board for layers/viewports/etc. https://player.vimeo.com/video/182485660
×
×
  • Create New...