Jump to content

Samuel Derenboim

Member
  • Posts

    483
  • Joined

  • Last visited

Posts posted by Samuel Derenboim

  1. Hi everyone, I noticed that the getlocation within a space name or space number works perfectly for any record that needs to be called out thats within a space. VW did a great first to show the space location for symbols located in a space....However, locating objects in space is half the battle until you need to calculate allowable wattage per room, or allowable illuminance, circuitry, or any information within a particular space entity.

     

    I noticed tags like =Getifcproperty() or =GetCOBieProperty(), but i don't know how to define them to call out areas. If it doesn't exist, would it be possible to include it in future generations of VW? 

     

    Also, is it possible to do the same with basic geometry? i.e. getobjname, getobjproperty, etc.... ? Below is an example worksheet where i would need to show the location and area of the location. The location column uses=GETSPACENAMEFOROBJ, the next column would ideally show area - then i can say whether or not that space is in compliance for wattage allowance based on the energy code.

     

    image.thumb.png.81b43b9d3a340285a92bb76e7783d767.png

     

     

  2. First Attempt.

     

    Procedure FillCountsRecord;

    Var    H1                :Handle;
        H2                :Handle;
        LocName            :String;
        LocName2        :String;
        RecName            :String;
        RecName2        :String;
        FieldName        :String;
        FieldName2        :String;
        CriteriaString    :String;
        CriteriaString2    :String;
        S1                :String;
        S2                :String;
        TheCount        :LongInt;
        
        Procedure Execute(H3:Handle);        {This is the procedure called by the ForEachObject command}
            Begin
                SetRField(H2,RecName,FieldName));
                SetRField(H1,RecName2,FieldName)); {Store the count in the record}
            End;
            
            
    Begin

        H1:=FSActLayer;
        LocName:=GetName(H1);
        
        If ((H1<>Nil) & (H2<>Nil) & (LocName<>'') & (LocName2<>'')) then
            Begin
                
            RecName:='!Ltlegend';                {Enter the Record Name you want to store}
            SetRecord(H1, RecName);
            FieldName:='Zone';
            
            RecName2:='!Lights';                {Enter the Record2 Name you want write to}
            SetRecord(H2, RecName);
            FieldName:='LZone';
                                
            CriteriaString1:='(((R IN ['!LtLegend']) & (ALL)))';   {Us the Criteria builder to generate the criteria string you want and store here}
            
            CriteriaString2:='(((R IN ['!Lights']) & (T=SYMBOL)))';   {Do not include the LOC criteria as that is defined by the named object}
                                            {selected when the script is run}

            S1:=Concat('((LOC=', LocName, ') & ', CriteriaString, ')');     {Do not change this line, only change Criteria String}
            ForEachObject(Execute,S1);
            S2:=Concat('((LOC=', LocName, ') & ', CriteriaString, ')');
            ForEachObject(Execute,S2);
            
            End
            Else AlrtDialog('Something went wrong. Either no object was selected or the LOC object was not named in the OIP.');
            
            SetDSelect(H1);                {Forces Refresh of OIP}
            SetSelect(H1);        
            SetDSelect(H2);                {Forces Refresh of OIP}
            SetSelect(H2);        {Resets to original selection state}
    End;

    Run(FillCountsRecord);

  3. Wow, this is beautiful. Works like a charm.

     

    In order for this script to have integrated information, it would be easier to simply copy the zone information in an attached record from the boundary onto all symbols in that zone rather than counting the objects. That way, i know if the zone matches between the objects and the zone itself, they could be aligned in the worksheet easily and specify any required specific information about that zone (like wattage, lumens, etc..)

     

    there was a script you wrote once regarding counting the number of people in a space object  by using the space object area and dividing it by a separate record. maybe that can give me a hint as to how to take information from one record and copy it to all the objects (or symbols) with the LOC of the boundary.

     

  4. I think i understand. Sounds like LOC function would be easier to use using a marionette of scripting function rather than a worksheet callout. Seems like keeping track of the names of the boundaries can prove to be a hurdle.

     

    I'm trying to use that script you made to study it a bit, but i get this error :

    image.thumb.png.f13b38283fb221911ab9c76c5b86482a.png

     

    Would the right parenthesis go somewhere in here?

     

    S1:=Concat('((LOC=', LocName, ') & ', CriteriaString, '))');

  5. Pat, that's exactly it. it is a duplicate object, that wasn't renamed, but the object name was not there. VW picked up that it was the same name and it didn't rename it, it left it blank instead. It however, was in the same exact location as another LOC object, hence why it picks up the information. but i'm guessing this might lead to some problems down the road? Should i submit a bug report?

     

    Note - i duplicated the layer, and it didn't copy the name. If i copy and paste the object, then it auto renames

  6. I think i accidentally found a bug. i just noticed in the file attached above - the geometry  was duplicated from one floor to the next. However, the name of the boundary was not modified, yet it still calculates the correct number of objects on the 2nd story when moving the fixtures from one boundary to another

     

    correct me if I'm wrong?

     

    the downside to doing everything by LOC function , turns out that every boundary object has to be unique in the entire building, and then create a nested conditional script that computes all of them, unless of course, yes, certain operations would be done by class or operation.

    The kicker is this, i often use id's that can be identical to different spaces that use the same id tag so long as it is subdivided by the =story condition.

    so ID=1 between one and another story will be printed separately if I invoke the =story command that separates their conditions.

     

    Here, you cannot do this. but it accidently worked when a boundary object is duplicated. don't know why. ☹️

     

    Update:

    Followup question - is it possible to simply list all the LOC zones and their names?

  7. I wrote the nested script in a matter of minutes once i figured out that i have to create a reference name for the zone name in the conditional statement...

    I'm thinking of just using an excel script to create a script for me that includes the maximum amount of zones the building house in one story. Turns out, it works on multiple stories !! I'm thinking about how i can do this in a simple manner and... will this crash VW?

     

    attached file below.

     

    Also, do you know if referencing the object name (=N) with a record using the datamanager would eliminate all these complications?

     

    count by zone nested-working.vwx

  8. yes, creating several database tables is possible for each zone. I thought it would be easier putting this in the criteria of the database, however, it isolates zones from the light fixtures in the space. So yes, the only other choice is to create a separate database for every zone, and thats only for one story. if i wanted to include a worksheet with all stories, and they had a different number of zones, thats when the worksheet will get a bit cumbersome to read as some stories that have less zones would return a blank record (unless database tables would be specified for every zone, and every floor).

     

    right now im working on a 5 story, 80 thousand square foot building, approximately 6-7 tenant spaces per story, and probably upwards of 5-6 lighting zones per tenant. it would be easier to match the name record between light fixtures and zones than to do it this way. or not use LOC altogether unfortunately.

     

    file attached is my second attempt. I tried to list all zones in one database row, and reference them for the zones and light fixtures in another. It separates the rows and the zones in the database row in the 1st one.

    count by zone test2.vwx

  9. I can see what you mean. With lighting you can have 10-20 zones easy (if i were to use the criteria energy code for example) per story, which is why i wanted to use a nested value rather than sorting it by different columns. Same goes for other criteria i wanted to list for 'building code' objects that would be located in separate tenant spaces. Those criteria can also exceed 20 objects per LOC....

     

    the way i wanted to get around it was to create a zone that didn't have anything in it and say LOC<>'Zone 3' to include all objects in all other zones, but alas it still reports an incorrect number.

     

    I'm guessing the script is the only other way to go? or to create a separate database table for each zone....which is also cumbersome

  10. regarding LOC='' in worksheets - the function only allows me to select one zone by name in the criteria selection, not all of them. Is there a criteria that can include all objects that have a record, and then print out all objects within them?

     

    i've tried multiple variable condition (if) statements without success. i've included a sample file with lighting zones with object names as Zone 1, 2, & 3, but the count reports the incorrect number of fixtures in each after moving them around.

    count by zone test1.vwx

  11. The areas there the most of my concern were the areas of the walls, the fact that they were on the energos worksheet, the R values seen, and the correct orientation is shown.

    The particular energos record for this is the 'energos wall' record, or 'energos window' record / energos 'door' record. The records for calling out wall areas to match that shown is wallareagross / wallareanet. However, i think it has a few bugs :

     

    1. wall orientation record referenced in the worksheet does not match the record of the object. It returns numbers instead of orientations. I'm guessing 6, 9, etc... are clock orientations, but i'm not sure. I don't know how 4 - became a 'south' orientation.

    2. Regarding wall area gross / wall area net - it still calculates to the center of the wall rather than to the finishes. in the attached image you will notice that this is true. 8'10 5/8"  x 10' = 88.845 s.f.

     

    I haven't done any experiments for windows or for doors just yet. But this is among my biggest gripes when calculating for wall areas for energy purposes (not wall take-offs).

    P.S. - If you add the width plus the length of the wall multiplied by the height, then you will get the true area value for the outside of the wall. If you subtract the width from  the length and multiplied by the height - you will get the interior side. But there are two problems. :

    1. These numbers can not be used in tags as they are calculated areas rather than being global operations. several global records may needed to be added with the formulas above (maybe this can be avoided if i calculated component areas that are abutting the outside , but i still do not know how to do that yet)

    2. That calculation will not work if two walls are directly abutting each other (capped or uncapped mode) would require 2 conditional statements for i.e. -

    If wall joined in capped mode on both sides : =(LENGTH+WALLTHICKNESS)*WALLOVERALLHEIGHT

    If wall joined in capped mode on one side : =(LENGTH+(WALLTHICKNESS/2))*WALLOVERALLHEIGHT

    If wall not joined in cap mode : =WallAreaGross

     

    Note - both problems can be fixed if using the worksheets - but picking up an error in the callouts might cause major headaches with the buildout or with the building department later.

     

    image.thumb.png.50885a3aa4b8ca1eb334b7a823e17ff4.png

     

     

    image.thumb.png.e3812290cf71acdb5646dfd44ad5b541.png

     

     

    EDIT NOTE:

     

    Is there a conditional format I can use to include or exclude walls that join in capped or uncapped mode?

     

  12. I'm not sure if this is possible in Vectorworks yet, but there are times when I need to count a number of objects/symbols inside the geometrical boundary of another object such as a rectangle or square. My question is - Is something like this possible to do ? Count the number of fixtures inside a geometrical figure and post it into a 'tag' and / or worksheet?

     

     

     

    image.png

  13. Hi Everyone, 

     

    quick question, have a VS script here, taken from a script that calculated occupancy load calculations from a space object using custom fields in the space plugin object. After VW has now transferred alot of the space objects capabilities into regular, geoemetry, I was curious if anyone can help me port a similar functioning script for polygons / rectangle objects. Script (and original author name is below)

     

    I attached a VW that shows some of the information I use in my documents. What I wanted to do is integrate occupancy in these areas, and some building code information. 

     

    Note - The script operates without any errors, but, for some reason it doesn't actually change the record. Maybe someone can be pointed in the right direction from some of the VSwizards out there? (This is a duplicate post from the architectural forum, but I deleted that post, and reposted in here, since I thought it could be more relevant) Thanks in advance!!!

     

    Modified Script (Original Script at the bottom)

     

     

    Procedure MaxOccupancy;
    {Badly scripted by Michael Klaers modified to General Object Areas}

    {November, 2015}
    {© 2015, Small Group, Inc - Michael Klaers michaelk@verysmallgroup.com}
    {Licensed under the GNU Lesser General Public License}

    VAR
        
        recordhand, WSResource, WSImgHand                :    HANDLE;                 
        StringOccRating                                                :    STRING;
        xArea, OccRating                                            :    REAL;
        TruncOccSpace, SqrFeetPerPerson                                :    LONGINT;
        
    PROCEDURE HowManyPeople(recordhand:HANDLE);

    BEGIN  {How Many People}
        
        SqrFeetPerPerson :=Str2Num(GetRField(recordhand,'!Zoning_Area','BC_persons/sf'));
        
        xArea := AreaN((INSYMBOL & INOBJECT & INVIEWPORT & (R IN ['!Zoning_Area'])));
        
        OccRating := xArea/SqrFeetPerPerson;
        
        TruncOccSpace := Trunc(OccRating);
        
        StringOccRating := Num2Str(0,TruncOccSpace);
        
        SetRField(recordhand,'!Zoning_Area','BC_#ofpersons',StringOccRating);

        ResetObject(recordhand);
        
        END;

    BEGIN
        ForEachObject(HowManyPeople, ((INSYMBOL & INOBJECT & INVIEWPORT & (R IN ['!Zoning_Area']))));

        WSResource := GetObject('Zoning Area Summations_Poly');
        WSImgHand :=GetWSImage(WSResource);
        RecalculateWS(WSResource);
        ResetObject(WSImgHand);
        
        END;

    RUN(MaxOccupancy);

     

    Original Script Below 

     

    Procedure MaxOccupancy;
    {Badly scripted by Michael Klaers}

    {November, 2015}
    {© 2015, Small Group, Inc - Michael Klaers michaelk@verysmallgroup.com}
    {Licensed under the GNU Lesser General Public License}

    VAR
        
        SpaceHand, WSResource, WSImgHand        :    HANDLE;                 
        StringOccRating                            :    STRING;
        xArea, OccRating                        :    REAL;
        TruncOccSpace, SqrFeetPerPerson            :    LONGINT;
        
    PROCEDURE HowManyPeople(SpaceHand:HANDLE);

    BEGIN  {How Many People}
        
        SqrFeetPerPerson :=Str2Num(GetRField(SpaceHand,'Space','11_User-Def Info 2'));
        
        xArea := Str2Num(GetRField(SpaceHand,'Space','Area'));
        
        OccRating := xArea/SqrFeetPerPerson;
        
        TruncOccSpace := Trunc(OccRating);
        
        StringOccRating := Num2Str(0,TruncOccSpace);
        
        SetRField( SpaceHand ,'Space','11_User-Def Info 1',StringOccRating);

        ResetObject(SpaceHand);

        END;

    BEGIN
        ForEachObject(HowManyPeople, ((PON='Space')));

        WSResource := GetObject('Space Occupancy Schedule');
        WSImgHand :=GetWSImage(WSResource);
        RecalculateWS(WSResource);
        ResetObject(WSImgHand);
        
        END;


    RUN(MaxOccupancy);

     

     

    Area Test_Poly v2020.vwx

  14. Rob and Wes, thank you very much for the tip. You're right, Unified view is something i didn't know about, unfortunately. It was probably switched off because of what you mentioned Wes, which was the saved views. I remember switching the save different view for each design layer, and that could've been the cause.

     

    Thank you again.

  15. More weird behavior 

     

    image.thumb.png.c5659ec62f4cc402ae019892deab6f76.png

     

    The same file - cannot display a layer based reflected ceiling plan and a BIM plan model at the same time. It is like the BIM plan freezes in place, while the reflected ceiling plan is rotated, panned, zoomed. This isn't a plane based issue because all objects on the reflected ceiling plan are layer based. 

    This also isn't a scale issue either, given that both layers are at 1:48....

     

    Not sure how to react to this. Can anybody offer some assistance?

  16. Not sure if it was an update, or something else, but graphics seem very glitchy / not smooth when panning and rotating a bim model. 

     

    Specs :

    Win10 Pro

    Intel Core i7 5820k @ 3.3 ghz

    32 GB ram - DDR4 2400, 16-16-16-39 CAS

    Graphics - Nvidia GeForce GTX 1070 Ti

     

    Is there a possibility VW might be using CPU for opengl? Although, I thought that this chip didn't have an on-board graphics module. Either way, maybe something I'm doing wrong?

     

    I attached DXdiag Output. 

     

    UPDATE: 

     

    As a test, I referenced the same file in a freshly made document, and the 3d animation is almost flawless. I now understand it's probably the file itself. Are there preferences that might be causing glitchy behavior?

     

     

     

    Thanks in advance!

    DxDiag.txt

×
×
  • Create New...