Jump to content

Julian Carr

  • Posts

  • Joined

  • Last visited

Posts posted by Julian Carr

  1. Unfortunately this is not possible as it was developed specifically for the Australian and New Zealand markets, and there would be a lot of work involved to start supporting other countries, some of which have very different standards or ways of displaying compliance.

  2. Yeah that was my exact thinking too Peter and the first thing I tried. The parent is the symbol definition though, not the symbol instance. I then wrote a DatabaseByScript script to build a list of the symbol instances, then look inside those for the doors:

    Procedure Test;

        Procedure DoIt(h1 : HANDLE);
            h2, h3, h4 : HANDLE;
            s1 : STRING;
            WSScript_AddHandle(h1); { add handle to symbol instance }
            s1 := GetSymName(h1);
            h2 := GetObject(s1);
            h3 := FInSymDef(h2);
                IF GetType(h3) = 68 THEN BEGIN
                    h4 := FIn3D(h3);
                        IF GetType(h4) = 86 THEN WSScript_AddHandle(h4); { add handle to door objects }
                        h4 := NextObj(h4);
                    UNTIL h4 = Nil;
                h3 := NextObj(h3);
            UNTIL h3 = Nil;

        ForEachObject(DoIt, (T=15));


    This gets the data I need on different rows:



    but there is no way to combine the door ID, Unit Type and Unit No. that I can see??



    • I am using symbols for repeated apartments in a building.
    • Each apartment symbol instance has a record attached that contains a field for the apartment type and apartment number.
    • The apartments contain doors in walls that need to be numbered in a schedule, and the required numbers are a concatenation of the door ID + apartment type + apartment number. So in one WS row I need to derive the three bits of data.
    • A DB worksheet reporting doors with INSYMBOL will identify the door objects, but these are derived from the symbol definition and not the symbol instances, so there is no path to the apartment information there. Using DatabaseByScript I can build a DB that contains handles to the door objects and apartments in separate rows, but there is no ability to mix that data.


    Can anyone think of an approach where this might work, using DatabaseByScript and/or RunScript? For example, is it possible for a DatabaseByScript script to not only build a list of handles, but to populate cells in the row via WSScript_SetResStr()?



  3. Explode = SymbolToGroup() = STG. If it will be a PIO and you want to rotate a symbol in the Z axis, then it must not be hybrid. You will need to investigate a way to restore the view after you switch it to 3D for the STG. Alternatively if the symbols don't contain groups or nested symbols, then you could get a handle to the symbol definition, enter the definition, loop through and duplicate 3D objects then use SetParent() to move them to the PIO, all within BeginGroup/EndGroup, then rotate the group.

    • Like 1
  4. Assuming this is just a script not a PIO, this should work:



    DoMenuTextByName('Standard Views', 2); { top}





    Also, the following will be true for a 3D object (mostly):  GetObjectVariableBoolean(h1, 650);

  5. It works in my code as does this:


                    Symbol(GetSymName(hSym), x1, y1, GetSymRot(hSym));
                    SymbolToGroup(LNewObj, 2);
                hGroup := LNewObj;


    But does SetRot3D() support groups? 

  6. Even better as a function:


    Function GetDimAngle(h1 : HANDLE) : REAL;
        h2 : HANDLE;
        i1 : INTEGER;
        r1 : REAL;
        b1, b2, b3 : BOOLEAN;
        h2 := FIn3D(h1);
            IF (GetType(h2) = 2) THEN BEGIN 
                GetMarker(h2, b2, b3, i1, r1);
                IF b2 | b3 THEN BEGIN
                    b1 := True;
                    GetDimAngle := HAngle(h2);
            h2 := NextObj(h2);
        UNTIL (h2 = Nil) | b1;

    • Like 2
  7. Hi Dom,


    Try this:

    Procedure T;
        h1 : HANDLE;
        b1, b2, b3 : BOOLEAN;
        i1 : INTEGER;
        r1, rAngle : REAL;
        h1 := FIn3D(FSActLayer);
            IF (GetType(h1) = 2) THEN BEGIN 
                GetMarker(h1, b2, b3, i1, r1);
                IF b2 | b3 THEN BEGIN
                    b1 := True;
                    rAngle := HAngle(h1);
            h1 := NextObj(h1);
        UNTIL (h1 = Nil) | b1; 
        Message('Angle is: ', rAngle);

  8. I think you'll need something like this (untested):


    Function DoesClassExist(sMyClassName : STRING) : BOOLEAN;
        i1 : INTEGER;
        DoesClassExist := False;
        FOR i1 := 1 TO ClassNum DO BEGIN
            IF ClassList(i1) = sMyClassName THEN BEGIN
                DoesClassExist := True;
                i1 := ClassNum;

  • Create New...