Jump to content

Andrew Neilson

Member
  • Posts

    8
  • Joined

  • Last visited

Posts posted by Andrew Neilson

  1. Seeking a Database formula for a Worksheet that will call up a SYMBOL with a RECORD and a PLUG-IN inside the symbol AND report them as a single instance in the DATABASE.

    What I'm trying to get is a single instance of the object in the DATABASE where I can put Criteria in columns from both the Record attached to symbol and the Plug-in inside the symbol.

    Closest I get is a database reporting both the Plug-in and the Symbol.

    Specifics:

    I'd like to have a window plug-in as a symbol (W-01) which repeats throughout the project. Want to pull Symbol Record info and Plug-in Info from inside the symbol in the Database row.

    The Record attached to the Symbol will contain specific info for each instance of (W-01). IE the North/South/East/West direction, wall type & Sill, Jamb and Head Detail # as they vary for each instance of (W-01).

    The Plug-in contains the width, height ect. which i'd like displayed in the same Worksheet.

    Ideas ???

    - my solution to date is 2 Worksheets, one reporting the record and the other reporting Plug-in inside the symbol. The symbol and plug-in have matching IDs (W-01) which are sorted. The worksheets are overlapped beside each other to create one big Window Schedule.

    - Any ideas or alternate solutions people are using would be appreciated!

    -Should I give up? Is a window the same size and type but different wall, sill, head and jamb - Simply another window type? - Architectural drafting convention?

  2. Using the Script below to rename classes. Works great - but realized its changing the class setting to 'default' black pen, white fill, lineweight of 1 ect.

    What could I remove/add from the script so that renamed class retains the same settings as the old one?

    ~A

    PROCEDURE RenameClassName;

    CONST

    kTOT_CLASS = 300;

    VAR

    i: INTEGER;

    curClass: STRING;

    oldList: ARRAY[1..kTOT_CLASS] OF STRING;

    newList: ARRAY[1..kTOT_CLASS] OF STRING;

    PROCEDURE ChangeName(objHdl: HANDLE);

    BEGIN

    SetClass(objHdl,newList);

    END;

    BEGIN

    oldList[1]:= 'WDA-Ext Door-Color 1';

    newList[1]:= 'WDA-Ext Door-01';

    FOR i:= 1 TO kTOT_CLASS DO

    BEGIN

    curClass:= oldList;

    ForEachObject(ChangeName,(INSYMBOL & INOBJECT & INVIEWPORT & (C=curClass)));

    IF Len(curClass) > 0 THEN

    DelClass(curClass);

    END;

    END;

    Run(RenameClassName);

  3. Both Pat & Peter's scripts do what I was hoping for. Thanks fellas!

    Sorry I'm no help with 'LNewObj' verus 'LObject' differences...

    With regard to Pat's point:

    "I am using Date(2,2) to generate a unique string since only a single object in the drawing can have a specific name, it just makes it easier to test without having to remember to delete the named object before running the script."

    Is there some way I could have the script bleep out "This name is already in use. Reverting to old name." just as VectorWorks does when one tries to name an object with a name already existing in the file.

    Thank-you all for your help!

  4. Thanks Miguel & Raymond,

    I've got the following working as an example, which changes objects classed as 'A' to 'Z'. Unfortunately its not working on objects in symbols.

    How might I modify this to include objects inside symbols?

    PROCEDURE RenameClassName;

    CONST

    kTOT_CLASS = 50;

    VAR

    i: INTEGER;

    curClass: STRING;

    oldList: ARRAY[1..kTOT_CLASS] OF STRING;

    newList: ARRAY[1..kTOT_CLASS] OF STRING;

    PROCEDURE ChangeName(objHdl: HANDLE);

    BEGIN

    SetClass(objHdl,newList);

    END;

    BEGIN

    oldList[1]:= 'A';

    newList[1]:= 'Z';

    FOR i:= 1 TO kTOT_CLASS DO

    BEGIN

    curClass:= oldList;

    ForEachObject(ChangeName,((C=curClass)));

    END;

    END;

    Run(RenameClassName);

  5. Hi Miguel,

    This looks very promising but keeps returning the following error:

    Line #9: newList: ARRAY[1..kTOT_CLASS] OF STRING:

    |

    { Error: Expected ; }

    |

    { Error: Expected BEGIN }

    Thanks so much for the help!

  6. I'd like to rename a classes in a file to my own standard classes...

    A lot of surveys I receive contain the same class names and I want to turn each of those into names I prefer. Can anyone provide an example?

  7. I'm calling up the values under the 'Data Fields' tab of wall styles into a worksheet. The values appear to be formated as text.

    In particular when calling up the Thermal Resistance Field:

    =('__NNA_Wall_Style_Format'.'Thermal Resistance')

    I'm unable to preform calculations on the database row without getting the result '#VALUE!'.

    1) Is there a way to force the returned value in the worksheet to be formatted as a number?

    2) Is there any way to find/modify the '__NNA_Wall_Style_Format'?

    Andrew N.

    VW12.5 Designer

    OSX 10.5

  8. Hi,

    Trying to create a script within a palette that will let me draw a line with a preset object name defined within the script...

    Don't know much about Vectorscript, I've tried using 'NameObject' but it doesn't give the line a name in the object info palette under the data tab as I hoped.

    Procedure CustTool;

    VAR

    Name:STRING;

    Result:BOOLEAN;

    BEGIN

    PushAttrs;

    NameClass('NonPlot');

    CallTool(-201);

    NameObject('testing');

    END;

    Run(CustTool);

×
×
  • Create New...