Jump to content

Grzegorz Krzemien

  • Content Count

  • Joined

  • Last visited

Community Reputation

16 Good


About Grzegorz Krzemien

  • Rank

Personal Information

  • Location

Recent Profile Visitors

819 profile views
  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


7150 Riverwood Drive, Columbia, Maryland 21046, USA   |   Contact Us:   410-290-5114


© 2018 Vectorworks, Inc. All Rights Reserved. Vectorworks, Inc. is part of the Nemetschek Group.

  • Create New...