Jump to content

Juno

Member
  • Content Count

    20
  • Joined

  • Last visited

    Never

Community Reputation

0 Neutral

About Juno

  • Rank
    Greenhorn
  1. There is a vectorscript example on the Nemetschek site for creating a custom dialog to align selected objects. http://www.nemetschek.net/support/custom/vscript/example.html The script demonstrates how to set up a dialog and use a resource file but the initial procedure and function definitions relating to bounding boxes and moving the objects, respectively, should get you started. HTH, -juno
  2. I am having trouble getting CreateEditTextbox to accept any entries in the dialog window. The arrow cursor turns into the text tool when inside the box, but the cursor never appears when I click and nothing shows up when I type on the keyboard. I've substituted CreateEditText and it works fine, but I would like to use a multi-line box. Any help would be appreciated. -juno
  3. Juno

    DelObject

    Is it possible for a PIO to delete itself from within its own script using DelObject? I've not been successful and I assume the object must exist while the script is running. Thanks, -juno
  4. Juno

    EOLN

    Unfortunately, the lines can have a variable number of entries. The StdReadLn is a possible solution but you are right, it is a pain. EOLN seemed like a simple answer but it doesn't work the way I expected it to, unlike EOF. Thanks for the suggestions, -juno
  5. Juno

    EOLN

    Hello Has anyone had any experience with the EOLN command? I have a tab delimited text file and EOLN appears to view the tabs as carriage returns. Is there a different delimiter I am supposed to use? Thanks, -juno
  6. Juno

    SetWSCellFormula

    Interesting alternative, but since I need '01' strings as well, I think I'll kill two birds with one stone and surround every cell entry with single quotes and strip them out before exporting. Thanks for the suggestion. -juno
  7. Is there a way to enter a string into a worksheet cell using SetWsCellFormula, without the result being calulated? I would like to enter the strings '12-15' and '01' into two worksheet cells but the contents become '-2' and '1' respectively. I have tried to define the entire worksheet as contraining strings using : SetWSCellNumberFormat(WShandle,1,1,rows,columns,4,0,'',''); but to no avail. Thanks, -juno
  8. Juno

    object lock status

    I hadn't switched by browser bookmark from VectorScript Function reference for V9.5, which didn't have index #700. D'oh. I wonder what other commands I haven't been using? Worked fine. Thanks, PeterT. -juno
  9. Is there a way to determine if an object is locked from within a script? I couldn't find a search criteria for locked objects and I would like to exclude them from a ForEachObject procedure. Thanks.
  10. Juno

    Resourse String

    John: I'm not very familiar with resource files. However, I was able to create a STR# resource file named "test.rsrc" using resedit, which I saved to the plug-ins folder. The resource ID for my file was 128 and the following code displayed an alert dialog containing the first string in the string resource list. PROCEDURE restrng; VAR dialogok:BOOLEAN; textitem:STRING; BEGIN dialogok:=SetVSResourceFile('test'); GetResourceString(textitem,128,1); AlrtDialog(textitem); END; Run(restrng); HTH, -juno
  11. Thanks Raymond. I am confused as to why the T=SPRDSHEET criteria exists at all unless it is treated differently for counting. I did notice that worksheets are "off to the side" as "objects", even when placed in the drawing. So much to learn... Much obliged, -juno
  12. Hello. The following line, ForEachObject(GetHandle,T=SPRDSHEET); does not seem to recognize the worksheets in my drawing, although other object types like RECT trigger the procedure. Is my object type name incorrect for worksheets? Is there a way to search by object type #, e.g. 18 for worksheets? Thanks, -juno
  13. Juno

    Duplicating PIOs

    Thanks Jason. Good to know about duplicates not being a new object. Regarding Message(GetLName(GetLayer(Ohandle))), I got a new layer creation for the duplicate and 0 for Message(GetLayer(Ohandle)). I still might be doing something wrong but it points me in a different direction for the code. Thanks for the help.
  14. I have the following script within a PIO. The purpose is to determine if the object being drawn is being created for the first time or just being redrawn. ------------------------- bool1:=GetCustomObjectInfo(Oname,Ohandle,Rhandle,Whandle); bool2:=IsNewCustomObject(Oname); {a new object is assumed to be on the active layer} {so for a regenerated object, make its layer active} IF bool2=FALSE THEN Layer(GetLName(GetLayer(Ohandle))); -------------------------- The problem is when I duplicate the object using Duplicate Array... The new (duplicate) object reads as existing (bool2=FALSE) and even though the object handle contains a valid value, GetLayer(Ohandle) returns zero. Am I doing something wrong? Thanks, -juno
  15. Juno

    Get File Path

    Is there a way to get the file path of the currently active document? GetFName only returns the name and GetFolderPath does not provide this as one of the selectors. Thanks.

 

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...