Jump to content


  • Posts

  • Joined

  • Last visited

Everything posted by DomC

  1. Hehe ... Thanks for joining my gimmick nodes and play it back to me, very nice :-) Well, they rotate ... good job.
  2. Hi I am trying to give vs.ForEachObject an additional argument. My Questions: 1. Is it Possible, to somehow use a search criteria example ('SEL=TRUE') for a "manually" created while loop? 2. Is there any chance, to add arguments in the vs.ForEachObject() loop? What I tried: vs.ForEachObject(GetParts, "SEL=TRUE") #This works option1='test' vs.ForEachObject(GetParts(h,option1), "SEL=TRUE") #Do not work (clear: because h is not referenced) option1='test' vs.ForEachObject(GetParts, "SEL=TRUE",option1) #Do not work option1='test' vs.ForEachObject(GetParts, "SEL=TRUE",option1) Is it just, i do not know enough about python or is just not possible because the ForEach-Functions, do not support that? Example Code(Python): sort='xy'#'yx', 'None' ObjList=[] BBoxList=[] ObjList_Sorted=[] width_list=[] height_list=[] def GetParts(h): #h ist handle to the ForEachObject Loop ObjList.append(h) p1,p2= vs.GetBBox(h) width=p2[0]-p1[0] height=p1[1]-p2[1] width_list.append(width) height_list.append(height) BBoxList.append((p1,p2)) h=vs.NextSObj(h) return() option1='test' vs.ForEachObject(GetParts, "SEL=TRUE") vs.AlrtDialog(str(width_list)) #Example while loop. It would be great, to loop objects with search criteria instead of vs.FSActLayer() etc. ObjList=[] BBoxList=[] ObjList_Sorted=[] width_list=[] height_list=[] def GetParts(h,option1): if h==None: #the same like vs.Handle(0) vs.AlrtDialog('please select object(s)') while h!=None: #the same like vs.Handle(0) ObjList.append(h) p1,p2= vs.GetBBox(h) width=p2[0]-p1[0] height=p1[1]-p2[1] width_list.append(width) height_list.append(height) BBoxList.append((p1,p2)) h=vs.NextSObj(h) return() h=vs.FSActLayer() GetParts(h,option1='test') vs.AlrtDialog(str(width_list))
  3. LOOOL Thanks for reporting Alan. Please modify your script with the following bypass. Please really, do it. (Do it, do it ....) It is a task for you. I Just made a special fix personally (it is 4.00 o'clock ->Screenshot why I am awake) for you! :whistle: Cheers
  4. DomC

    Get user info

    # Python Script import os import pwd user=pwd.getpwuid(os.getuid())[0] serial=vs.GetActiveSerialNumber() vs.AlrtDialog(user+' '+serial) Or for Module Informations: module=vs.GetEnabledModules() For Module Number look here: http://developer.vectorworks.net/index.php/VS:GetEnabledModules
  5. Hi There are some nodes, which produces different results in a 3D or a TopPlan View. (Examples: Ungroup 2D/3D Symbol, Get Bounding Box) So the idea was, to make a "GetView" at the start of a script and make a "SetView" at the end of a Marionette network. So far I was able to put that togheter. Existing Problem: At the End of the Network I have a Node, that executes This seems, to set my render-mode to the right value. But it won't re-render my screen. Maybe because there is a conflict to the internal marionette ReDraw system. I tried ReDraw, ReDrawAll Anyone has an idea how to fix that?
  6. Have you tried out to do wall hole with locus points? I think im some cases locus points could maybe do the hole right, without using hole geometry
  7. Have you tried out to do wall hole with locus points? I think im some cases locus points could maybe do the hole right, without using hole geometry
  8. Hi Maybe you could use PtArrayStartEnd for calculation Point between two points. https://techboard.vectorworks.net/ubbthreads.php?ubb=showflat&Number=223249#Post223249 And then place your objects with The "PutByRefPoint"-Node https://techboard.vectorworks.net/ubbthreads.php?ubb=showflat&Number=221843#Post221843 Also the "PutBy RefPoint" can align existing objects to specific axis. Some instructions to to this:
  9. A little update of the marionette script (can now be edited in 3D view). GetBBox Node had to be modified for this (vs.ResetObject()) Also there is an instruction movie for the randomise symbol example:
  10. Or Maybe this one, of you want to get x,y from an external text file, till Alan finished the get worksheet node :-) https://techboard.vectorworks.net/ubbthreads.php?ubb=showflat&Main=43618&Number=218882#Post218882
  11. Actual Version v004 How To use: Examples: NURBS Examples exhibition wall
  12. Hi Alan There are nodes for trigonometric function. Is it not that, what you are looking for? this nodes returns radiants. If you want to have angle degrees you can convert them with the "Deg2Rad" Node. But the real challenge is always to find the right triangles in our drawings :-)
  13. Explanation PtArrayStartEnd - Node https://www.youtube.com/watch?v=5Hewxf69NSc And a further example-usecase which can be easy made by that node. The nodes calculates the 3D Vector between two points. The requirement of a 3D direction happens in many possible examples. Thats why I use this node (or a pre-version of it), in many of my examples.
  14. You can finish your stair example as follows: 1. Check if points are part of a cw polygon or not (is cw node) 2. Add 180° degrees to the rotation angle for all cw objects Making stair-step fit to radius, will be the further exercise :-)
  15. Try using this node: It checks triangle polygons of the pointlist if they are cw or ccw. It not finish your example but I think with this node, you can finish your stair example. It it gifs you a list of 0 and 1. 0=False (ccw) 1=True(cw) from every input point list (2D/3D)
  16. Alan, I really love the way you are playing with marionette.
  17. Hi Why searching so far. Remember the "Point Array Start-End Node". This is something else that powerfull "Dom-Node" :grin: can do. It calculates 3D Angle angle between two points. That is the hardest job in that example. After That, your sweep, can be placed by the "PutByRefPoint"-Node. Try to make this with "native" Nodes, is hard. But I think it is just a question of time, more powerful and complex node will be "native".
  18. DomC

    reverse string

    You are so right, Dieter.
  19. DomC

    reverse string

    Hi Is there a reason, you want explicit make this in pascal-vectorscript or may it be in python-vectorscript? #Example: string='This text can be easy reversed by severel python functions' rev_string=string[::-1] vs.AlrtDialog(rev_string) #or even shorter rev_string='This text can be easy reversed by severel python functions'[::-1]
  20. Hi A much better, more flexibel version of the reshape node. The request for this kind of node, was not very big :-) But I still worked on this project. This node needs further explanations. I uploaded a movie for that node: Instructions: 1. Input a group in this node 2. This group contains a first group with drawing content 3. A second group with reshape groups in 4. A Reshape group contains a polygon and a parameter-dimension. 5.The reshape group has to be in front of the drawing group 6. The Input Nodes in the Marionette network inputs a parameter name and a value 7. The parameter name, has to be exactly (First two characters) the same, like the prefix of the parameter-dimension text. A suffix can be used, to set a operator (factor). In this way, there can be used a reshape zone which calculates his value out of another value without having its own input field (An object, which has to stay somewhere on a midpoint etc.) Vectorworks file with examples: (Re-) parametrisches Symbol v2016.vwx parametrisches Symbol v2017.vwx
  21. If anyone is interested. I got it :-) Object Value 13 and 14. Example Code (Activate a Dim, if you want to test or you will crash): dim=vs.FSActLayer() p1=(2,3,0) p2=(7,3,0) vs.SetObjectVariablePoint(dim,13,p1) vs.SetObjectVariablePoint(dim,14,p2) vs.ResetObject(dim) I found nothing in the VW appendix. I just looped all possible commands, settings and variables and searched the right kind of data.
  22. Yes, mixing real and dim values often results in errors in different files with different units. In the file it do not work, imperial (dark side) units are used :-) But in this case actually the 2D/3D separation part of the node can be blamed for this issue. And with "very good found" I mean, I also forgotten to check that in my custom node "PutByRefPt"
  23. Hi Nik I think you found a "limitation" in the move node. Newly created and duplicated objecs are aligned on the plane (Screen Plane, Layer Plane), which the document is setup to. But the move node try something to handle with planar, not planar, 3D Point, 2D Point,2D move and 3D Move. So because point input is a 3d-Point and your object is sreen-plane (2D), it do not move. Very good found ... :-)
  • Create New...