Jump to content


  • Posts

  • Joined

  • Last visited


1,095 Spectacular

Personal Information

  • Occupation
    BIM architect
  • Homepage
  • Hobbies
  • Location

Recent Profile Visitors

3,434 profile views
  1. I would love to do an article about xml, that was also a pretty undocumented speciality that I shared quite a lot across like-minded friends. Put together all the things learned, all the precious hints from the VW engineers.
  2. You cannot imagine how it was to put that description together, there was no documentation whatsoever. It is also so complex, that I myself, in spite of having by now quite a lot of list browsers in usage, must consult that article for details.
  3. Don't worry Jayme, and thank you for the hint: I will give a look to them as well. I just want to find all the problems with the vector stuff, then I am looking forward to expand to new themes.
  4. @BillW, thank you so much for the library files, precious stuff you have there.
  5. And thinking better: items within Python's tuples are immutable. The routines can thus only return a new tuple. So I see these options: var v = ( x, y, z ) if a vector variable is preloaded with a third item, return a new tuple whose var[2] has the preloaded var[2] value var v = ( x, y ) if not, return a tuple in the form ( x, y, 0 )
  6. Yes, I experimented extensively and added various notes and will add more in these days, hopefully this will help other Python novices. I kept on trying to fetch vectorial data and getting abstruse nonsense values. The loss was due the fact that, in spite proper 3-dimensional inits: both routines GetPolyPt and GetPolyLineVertex return 2-dimensional tuples, shortening if longer. vector routines expect 3-dimensional tuples or return gibberish I think that both GetPolyPt and GetPolyLineVertex should simply set the first two items and leave the third alone. It does feel wrong, when an item is deleted from a tuple. There are scenarios where a z value is preloaded. But as always is rather a matter of finding an acceptable workaround (and documenting the problem), which in this case was easy. As a principle all problems I am having in Python are due to the way vectors are accessed, manipulated and resolved. So, that overcome, all will be well. p = vs.GetPolyPt( polyHandle, vtx1 ) # sets a tuple with 2 items in the form ( 0, 0 ) ang = vs.Vec2Ang( (p[0], p[1], 0) ) # make sure that there is a z coordinate or vs.Vec2Ang will fail, if p has only 2 items (VS Python only, Pascal OK ) # alternatively if len(p) == 2: p += (0,) # add a 3rd item to the tuple ang = vs.Vec2Ang( p ) # returns angle # FAILURE EXAMPLES: # ang = vs.Vec2Ang( p ) # always returns 90 # ang = vs.Vec2Ang( (p[0], p[1]) ) # always returns 90 https://developer.vectorworks.net/index.php/VS:Vec2Ang https://developer.vectorworks.net/index.php/VS:GetPolyPt https://developer.vectorworks.net/index.php/VS:GetPolylineVertex
  7. Ciao @twkyes, but it shouldn't shorten p, this is the main problem. I am trying to use the vector routines and they need -contrary to the pascal version- to have a third slot set.
  8. It is good that I am a person with lots of patience and a good measure of endurance... after I don't really know how many days of early morning trials I finally managed to discover the reason of some heavy quirks in my [never ending] ramp project in Python, my current baby. And here they are, for you NOT to go through the same: vs.GetPolyPt and vs.GetPolylineVertex return a bidimensional tuple If you passed some z values before in the third slot, you'll loose them expected: set items 0 and 1, leave 2 as it is. Certainly not shorten the tuple! The fact that these routines kill the third item is also bad for usage in the vs vector routines, such as vs.Vec2Ang, which expect a 3-items tuple. Is this a bug or expected behaviour in Python? Try this: # test GetPolyPt p = (0, 0, 0) vs.AlrtDialog( 'init tuple: ' + str(len(p)) ) # 3 items p = vs.GetPolyPt(vs.FSActLayer(), 1) vs.AlrtDialog( 'after GetPolyPt: ' + str(len(p)) ) # 2 items?!? # test GetPolylineVertex p = (0, 0, 0) vs.AlrtDialog( 'init tuple: ' + str(len(p)) ) # 3 items p, vertexType, arcRadius = vs.GetPolylineVertex(vs.FSActLayer(), 1) vs.AlrtDialog( 'after GetPolylineVertex: ' + str(len(p)) ) # 2 items?!?
  9. Hello, I'd like to collect and study some valid third party Python libraries for Vectors, what do you use? So far I tested: the one in this example: https://developer.vectorworks.net/index.php/Python_Sample_2D_Path_Object: mind that the __div__ defs are obsolete. This looks like a reduced version of something else McLeonards: https://gist.github.com/mcleonard/5351452 Pygame 3D vectors: https://www.pygame.org/wiki/3DVectorClass?parent=CookBook. I am on this one now thank you _c_
  10. Like many before me, I am struggling to get any kind of User Interaction work in custom plug-ins. This is Vectorscript-Python only, Vectorscript-Pascal works flawlessly. This affects routines like vs.GetPt, vs.GetPtLn, vs.GetPickObjectInfo, vs.TrackObjectN, etc.: there is no way to set global vars, and most attempts crash VW. I read over and over all posts in the present list, I cannot get it done. I am fairly new to Python, so first of all I ask: is anyone aware of a way to get above mentioned routines work in custom plug-ins? If yes, please let me know how. Otherwise, I'd like to file bug reports. Hopefully we can get a fix at one point, since this problem is recorded since Python was introduced in VW. There are two things discouraging users to switch from Pascal to Python: lack of user interaction support and weak code encryption. If we could resolve the first it would be great. Please @K.Lalkovski, can you help us there? Thank you _c_
  11. Are we now in for a sterile discussion? Others [for example us] might need it, I am afraid. We speak about generated sections or elevations from shipped objects. That's something particular, different than coordinating models. That's standard plans and sections, no matter how you get them, they must comply to the environment they are to be used into. [deleted. This is indeed so useless]
  12. si, exactly. I was referring to this discussion, where I indeed said "it cannot be done":
  13. @Christiaan said I said it cannot be done. You said " you bet". I felt unjustly accused! Where did I say that issuing plans and sections in VW cannot be done? That's the one thing VW does better than any other app, I do have quite a problem with the objects generating above mentioned plans and sections, so do you -both- and any architect in this list, BTW. 😋
  14. ? Issuing correct IFC for multiple buildings from a singular file: how can it be done, so that the singular buildings are properly issued? I don't know how. Issuing plans and sections? That can be done.
  • Create New...