Jump to content

Grzegorz Krzemien

  • Posts

  • Joined

  • Last visited

Everything posted by Grzegorz Krzemien

  1. GOT IT. The correct combination of quotes is: vs.ForEachObject(RectSort, "PON='Space'") Full script: import vs def SpaceSort (h): area = vs.Space_GetNetArea(h) if area < 10: #value in m2 vs.SetClass(h, 'RED') if area >= 10: #value in m2 vs.SetClass(h, 'BLUE') vs.ForEachObject(SpaceSort, "PON='Space'") Thanks for help!
  2. Tried all of these combinations: vs.ForEachObject(SpaceSort, PON='Space') vs.ForEachObject(SpaceSort, (PON='Space')) vs.ForEachObject(SpaceSort, ((PON='Space'))) but all of the fails. First version gives error that suggests that there are no keyword arguments in vs.ForEachObject(), second and third that syntax is wrong.
  3. Managed to do this in a different way: First - same idea, but with Rectangles: import vs def RectSort (h): area = vs.HAreaN(h) if area < 10000000: vs.SetClass(h, 'RED') if area >= 10000000: vs.SetClass(h, 'BLUE') vs.ForEachObject(RectSort, "T=RECT") Works great. I tried to recreate this, but instead of using rectangles, I wanted to use Spaces. import vs def SpaceSort(h): area = vs.Space_GetNetArea(h) if area < 10000000: vs.SetClass(h, 'RED') if area >= 10000000: vs.SetClass(h, 'BLUE') vs.ForEachObject(SpaceSort, PON='Space') But it fails. There is something wrong with criteria I think, but I don't know what. I couldn't find "Space" object on this page: https://developer.vectorworks.net/index.php/VS:Search_Criteria#Search_Criteria_Sub_Types so I assume, I create a criteria in a wrong way.
  4. @Pat Stanford, thanks So I think I don't really get the "handle" idea. I tried to write a similar code for rectangles: RectCount = int (vs.Count('Rect')) RectList = [] for i in range (RectCount): obj = vs.GetObject((T=RECT)) area = vs.HAreaN(obj) RectList.append([obj,area]) for j in range (len(RectList)): if RectList[j][1] < 10.00: vs.SetClass(RectList[j], 'RED') elif RectList[j][1] >= 10.00: vs.SetClass(RectList[j], 'BLUE') but I don't know how to describe a criteria to search for specified object (e.g. rectangle).
  5. Hi all, I'm pretty new to direct scripting in Vectorworks, but always wanted to learn. As a first attempt I wanted to create a simple script that searches for "spaces" and assigns them to appropriate class depending on Net Area. In my file there is an example that should assign Spaces with area <10m2 to the RED class and rest to the BLUE class. But, obviously, it fails since I' pretty green in this Area 🙂 Can someone give me a hint, not the solution, something that will help me to write this script? Space sorting script.vwx
  6. Tiles in roof work fine. I even tried to reinstall my VW21, so now I'm working on a clean software. This affects only slabs.
  7. @Tom W. Yes I have 'In Wall + Fit to wall' enabled. All of my Tile fills work fine in walls, but fail in slabs. Funny thing is that the same file in VW2020 works fine. Slab test v2020.vwx
  8. Hello, I have some problems with Tile fills in my slabs. I tried to create own Tile fillings for my slabs, but they all fail in sections. As I noticed even built-in Tile fills do not work properly - they are moved, not aligned etc. I tried many combinations of settings, but still either I am missing something or it just does not work. Picture and file in attachment. Slab test.vwx
  9. @Tom W. Thanks, for the idea of using 'Add 3D Object to Slab'. But as you noticed I do not get the data/annotations info, so it is rather a half of the solution. Thank you very much for your time. Maybe somebody else will have some kind of an idea how to approach this kind of a task.
  10. @Tom W. I want to be able to change slope values. In the file I have sent there are 3 stages of my work - 1. Base slab. 2. Slab with drains in the corners. 3. Slab after connecting all drains together. My problem is that when I am connecting drains together, VW generates 5,2% slopes every time - no matter how slopes were described before connecting drains. I assume that it is somehow connected with saddle settings, but whenever I want to change saddle value Vectorworks crashes. So I have no idea if I am doing something wrong, or there is another way to create this kind of roof from slab. Thank you very much for your time :).
  11. @Tom W., here is a VW2020 file. There is a section that explains, what I want to achieve. I do not think that I can get the same looking section by using Roof tool. Drainage tool v2020.vwx
  12. Hello! I have a problem with drainage tool. I wanted to create 4 slopes on my slab that all of them go down toward different edge . I tried to create that by using 4 drains and connecting them. But every time I create this I can not change the slope's value (it's always around 5%). Is my approach wrong? If so, then how can I make this kind of roof? My file and picture of what I'm trying to create are attached. Drainage tool.vwx
  13. @Tom W. Yes, that is exactly what I am looking for! Thanks, I can not believe I missed that.
  14. @Jonathan Pickup Thanks, but it is rather work-around. In the Info Palette there is an options but it is greyed "Copy linestyle from..." and it is set to "Wall line". Is it possible to change this setting?
  15. Hello, I have a simple problem. I want to connect two walls with the same component (all attributes are connected with a class) to create one wall with various thickness. As you can see in the picture VW recognises ends correctly, but uses two different line styles - for the outer and inner face as defined in the class and for the endings much thinner. Any hints? WallConection.vwx
  16. @Peter Neufeld, thank you so much for your time. I will do some more research and probably report this.
  17. @Peter Neufeld, I have checked this one and still it is not the answer. No matter how you manage visibility settings, objects that should be partially covered by a solid are visible like they would be on top of solid, not inside it. See the picture in the attachment.
  18. So I am using clip cube to create some kind of horizontal section (like a plane, but by using clip cube). The thing is that if I use clip cube to create plan (horizontal section) there is a bug. But if I use the same clip cube to create classic section (lets say vertical) it works perfectly. Clip cube bug.vwx
  19. @Peter Neufeld, thank you for your time anyway 🙂 I really hope I will find where the problem is.
  20. It is not a solution. By changing cut plane to infinite you just show the top view. If I add "slab" to my solid (add an extrusion on top to mimic slab top view) chair is still not visible. More accurate model in attachment. Clip cube bug.vwx
  21. @Peter Neufeld, thanks for answer. But it is not the 3D view or OpenGL problem. My case is visible on the sheet layers (I have prepared one with explanations). You can see that there are differences between section viewports that go through solid with a hole and solid without a hole. I cannot see the chair in the section viewport on the sheet layer. Changing view from standard to orthogonal does not work. If I change rendering style to "Dashed Hidden Line" it works (chair is in place), but using option "Hidden lines" chair is gone some how but it should be visible.
  22. I think the same. This really looks like a bug or some kind of "work in progress" thing that was not finished. I will report it and maybe it will be changed in the next patch. It is a quite important node so it should be fixed as soon as possible. @AlHanson, @the frog - thank you so much for your time 🙂
  23. Hello, I have a problem with Clip Cube tool. While using clip cube to create sections it creates some kind of white mask (white filling) when cutting through solids. Objects does not appear if they are below cutting line and at the same time cutting line does not go through a hole in the solid. Everything works fine if cutting line goes through any kind of hole in the solid. Hope someone can help mi with that or at least explains why it works like this. Example file in attachments. Clip cube bug.vwx
  24. Hello, I tried to recreate my old script from 2019 and I have encountered strange thing. Group node in v2020 is different than Group node from v2019. In my example new node (v2020) does not work (gives 0 values), while v2019 node works fine. Does anyone has an idea why this node needed to be changed any why it does not work now? Both nodes in example file. Group test.vwx
  25. Thanks, I need to check this, but anyway can't wait for VW2021 then 🙂
  • Create New...