Jump to content

Juno

Member
  • Posts

    20
  • Joined

  • Last visited

    Never

Everything posted by Juno

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

    GetPtL

    Thanks. I doublechecked the settings (they were ok) but the snap-to still eludes me when I use GetPtL instead of GetLine. Likewise, I can specify the angle in the Data Display bar above the drawing area using GetLine, but not with GetPtL. That is, I can type in an angle but the resulting "rubberband" line is not constrained in the drawing. -juno
  17. Juno

    GetPtL

    No difference I'm afraid. I've noticed that the vertical and horizontal angle snap does work, however. GetPtL just seems to ignore the 30/60 and 45 constraints. In fact, if I change the alternate coordinate system angle to 45 (double hit "s"), it recognizes the constraint. Just not the two check boxes above. Has anyone been able to use GetPtL in version 9.5.1 with the constraints? I wonder if it's a bug. Thanks for your suggestions. -juno
  18. Juno

    GetPtL

    I have found that the "rubberband" displayed with the GetPtL command no longer snaps to constrained angles in VW version 9.5.1. It does continue to work with GetLine, however. Is there an alternative for constraining angles when the first point of a line is fixed? Thanks -juno
  19. Thanks to you both. I was hoping to avoid a menu command to "refresh" or move the objects but your examples suggest some possible approaches that I can put to our group to see which they prefer. I appreciate the help.
  20. Is it possible to execute the script for a plug-in object, whenever it is sent to a different layer from the Obj Info Palette? I would like to automatically re-scale the object on the new layer.
×
×
  • Create New...