Jump to content

DavidF

Member
  • Posts

    3
  • Joined

  • Last visited

Posts posted by DavidF

  1. On 4/26/2017 at 4:45 PM, Pat Stanford said:

    Yes, it is possible. I am liking the RunScript WS function more and more. Still needs some work, but it offers great potential.

     

    Create a new Vectorscript named ClassDescrip and paste the following code into it.

     

    Procedure ClassDescription;
    {© 2017 Patrick Stanford pat@coviana.com}
    {Licensed under the GNU Lesser General Public License}
    {A Vectorworks 2017 worksheet script to return the Class Description}
    {of each object in a worksheet database.}
    {Run using the RunScript function in the worksheet}
    
    var	S1:String;
    
    Begin
    	GetDescriptionText(GetObject(GetClass(WSScript_GetObject)),S1);
    	WSScript_SetResStr(S1);
    End;
    
    Run(ClassDescription);

     

    Now add a column to your worksheet of classes. In the database header row add a formula of:

     

    =RunScript('ClassDescrip')

     

    Answer the dialog box to allow the script to run and you should have the class descriptions you are looking for. 

     

    Remember that the description can have multiple lines and you will probably need to manually adjust the Row Heights to make it look good.

     

    Hi, I'm probably doing something wrong. I have created runscript, but when I add =RunScript('ClassDescrip') into a cell, nothing happens. Could someone please show me with a screenshot how you did it?

    / Programming illiterate person

×
×
  • Create New...