Jump to content


  • Content Count

  • Joined

  • Last visited

Everything posted by MaxStudio

  1. Pat, I tried this and it sort of worked. The problem is it only work if I changed the note from the worksheet. Also, when I changed the worksheet it did not update the symbols until I selected one, chose edit 2d symbol and then clicked ok. After that they all updated. Unfortunately, it wouldn't update the note or tags from the Data tab on the OIP. I'll check the manual to see if I can come up with a solution. Josh, how do i go about making a button event?
  2. Pat, That's exactly what I'm trying to do. What do you mean when you say "the worksheet is set up to SUM on the Tag field" Thanks Derek
  3. I want to be able to create a PIO that works like a symbol, but I only want to create one plugin tool to create these PIO. one plugin tool that creates the multiple PIOs. "This is PIO 1" , "This is PIO 2", "This is PIO 3" I want to be able to select "This is PIO 1" and duplicate. (I can accomplish) I then want to change the text of "This is PIO 1" to "This is the NEW PIO 1" (I can accomplish) (the part I don't understand how to accomplish) Once I change "This is PIO 1" to "This is the NEW PIO 1" I want it to change all the instances of "This is PIO 1" to "This is the NEW PIO 1". I've tried having the plugin object create a symbol, but once it becomes a symbol it loses it's plugin object abilities. My only other solution might be to create a way to tag each plugin... Create another Variable to Label them... I was hoping to use the text "This is PIO 1" as the Label and the String of text created. I hope that makes sense to you. BTW, I'm not sure if I'm trying to reinvent the wheel. I just want a tool that makes it easy for me to create notes... when I change the one instance of the note they all change. I just don't want to have to double click and go into a symbol to accomplish this.
  4. I was planning on creating a plugin object to do the following... Create a some text that is converted to a symbol. I want to duplicate that symbol. I want to be able to edit the text of the symbol via the Object Info Palette and have it change all the instances of the symbol. Is this possible? Would it be better/easier to create a plugin object that references a worksheet? Thanks Derek
  5. "Too many files open" Are we limited to the number of include files I can use in a script? My script uses, at the moment, a total of 19 included .px files. I received the message above after trying to compile my script. I removed 1 of the .px files and included the script in one of the other 18 files. The script then compiled correctly. Has anyone ran into this problem or know of a work around? Thanks Derek
  6. thanks i'll give it a try
  7. When I change the units in my drawings my plugin object changes size. I realize this is because I never specified the units in my script. how do I declare a variable as inches or feet? my width and height are: width:=4; height:=6; when my document is set to 'feet and inches' it draws it correctly; a rectangle that is 4" x 6" but when I change my units to 'feet' it draws a rectangle that is 4' x 6' how do I write the script so the rectangle remains 4" x 6" even when my units is changed to feet? width:=4"; or width:=4in; Thanks in advance Derek
  8. J, That's a great reference thanks. What do you mean by "Efficient encrypting?" Thanks Derek
  9. Hey! I did what you suggested and got the information to come over. 1. I kept the original worksheet in FileB. 2. I referenced FileA along with the Layers I that were associated with the schedule database information. 3. My criteria now allowed me to include those referenced Layers from FileA. 4. I set up the criteria correctly and once i Updated and Recalculated the information arrived. So it works, but I am unable to edit the referenced database information in FileB. The information is locked (grayed). Thanks everyone for your help!
  10. Lets say I'm trying to reference WorksheetA (from FileA) into FileB. While FileB is active I will choose FileA in the resource browser and right click the WorksheetA resource. It will allow me to import the worksheet, but the "reference" option is grayed out. If I import the worksheet it will not be imported with any database information from FileA. (notice how 'Reference' is grayed out) So I tried an alternative route. I tried setting up a reference to WorksheetA through the "Organization" menu. In FileB I go to Organization>References. I click New and Add FileA to my reference list. Then in FileB I create a new Viewport. The Viewport "source" is existing reference file "FileA" I choose the layer that WorksheetA is on and click 'OK' A viewport is created in FileB. It shows WorksheetA but does not include any database information. This is what WorkSheetA looks like in FileA (notice the database information it contains) This is what WorksheetA looks like when in FileB (notice there is no database information. I am trying to get that information to carry over from FileA to FileB) I would like to have the Worksheet and its information available on a separate file. I know I could export it, but I wouldn't be able to have the ability to update the Worksheet through the reference so I would have to export it each time there is a change. Any ideas? Thanks for your help
  11. I'm trying to reference a worksheet from an existing file. The worksheet uses database rows. I've tried referencing the file and the layer of the worksheet using a viewport. The viewport of the worksheet does import, but none of the database information shows. Does anyone know what I might be doing wrong? Thanks in advance.
  12. yes I was definitely missing the point. I finally got it working using the process above. I'm pretty excited about this because in the past I had to place the include files on each computer I wanted to run the script on. Now I only have to copy the one plugin file. Thanks again for your guidance. It is very much appreciated.
  13. ok i think i may have figured out an alternative way to encrypt the script. 1. I set up the parameters as in Image01. 2. In the script editor (Image02) I paste the code from CreateRectangle.px and compile the script. 3. If everything go well I close the Plugin Editor and test the plugin. 4. If it works, I open up the Plugin Editor a 2nd time and highlight my plugin 'CreateRectangle' 5. I click and hold the following button combination: Caps Lock+Shift+Option+Command and click the script button twice. It locks my script and I can no longer edit it. 6. I shutdown vectorworks. 7. I moved the 'draw.px' file to a new location (to test that the plugin no longer needed to access the file.) 8. I restart vectorworks and test my plugin. It's still working without the 'draw.px' file. That seems to work. Does anyone know anything wrong with this process? Does it give me the same result as using the "Encrypt VectorScript" menu option?
  14. Thats where I'm getting confused... do i create and define the parameters through the plugin editor before I encrypt the script? Lets say I do, do I copy anything into the "script" area? i did some screen shots to help explain: Image01: (the parameters defined) Image02: (nothing pasted in script editor, should there be?) Image03: (this is the file name before encrypting) Image04: (the file i choose to encrypt) Image05: (the encrypted file I save and the location, what extension should this file have, notice there is already a file in the folder named 'CreateRectangle.vso' because of the parameters I created in vectorworks, do i choose to overwrite that file or create a new one?) What do you think?
  15. I want to reference a worksheet from another file, but the 'Reference' option is grayed out in the resource browser. Does anyone know why this might be happening? Both files were created with the same version of vectorworks.
  16. I'm sorry I'm confused and not having success. Do i need to set up the script in the vectorscript plugin editor with all my parameters before encrypting? Normally without encrypting I do the following: 1. Create the script parameters in the VS Plugin Editor with the plugin name CreateRectangle. 2. Paste my script in the script area and compile. 3. Add it to my workspace. 4. It works. This is the process i'm attempting to going through now: 1. Create the script parameters in the VS Plugin Editor with the plugin name CreateRectangle. 2. Encrypt the script by selecting the CreateRectangle.px file 3. Save the new CreateRectangle plugin file to the Plugins folder. Should this have an extension? It doesn't seem to save with one. 4. Then i shut down vectorworks and restart. I don't understand how the newly created encrypted plugin connects to the parameters in the VS Plugin Editor. I must be doing something wrong or out of order. also when you say to comment out the variable definitions is this what you mean? PROCEDURE plugin; VAR x, y, width, height:REAL; result : BOOLEAN; objname : STRING; oh,rh,wh : HANDLE; BEGIN { retrieve custom object information } result:= GetCustomObjectInfo(objname,oh,rh,wh); { if object information was successfully retrieved } IF result THEN BEGIN { retrieve parameters } { width := PWIDTH; height := pHEIGHT; } {$INCLUDE Macintosh HD:Users:Library:Plugins:draw.px} END; END; RUN(plugin); I really appreciate your help. Thanks
  17. This is the .px that I select when encrypting PROCEDURE plugin; VAR x, y, width, height:REAL; result : BOOLEAN; objname : STRING; oh,rh,wh : HANDLE; BEGIN { retrieve custom object information } result:= GetCustomObjectInfo(objname,oh,rh,wh); { if object information was successfully retrieved } IF result THEN BEGIN { retrieve parameters } width := PWIDTH; height := pHEIGHT; {$INCLUDE Macintosh HD:Users:Library:Plugins:draw.px} END; END; RUN(plugin); Then the draw.px file has the following: Rect(x, y, width, height); When I run the Encrypt on the first px file it tells me: width := PWIDTH; (identifier not declared) height := pHEIGHT; (identifier not declared) I'm not sure what is going on. How do the variables interact with the parameters in the VS Plugin Editor? How does the script know what the default parameters are? I'm guessing that disconnect has something to do with it.
  18. Ok so i tried encrypting and I got a bunch of errors telling me all my parameters were not declared. Any idea what that is about? I know the script compiles and works correctly if I enter it through the Vectorscript Plugin editor.
  19. also, can i put the includes in a subfolder in the plugin folder?
  20. so if the plugin is stored in the plugin folder my px files need to be stored there as well? (only until encrypted... then i can remove them?) I know what you mean with the empty line. I've run into the problem many times where I didn't hit return after I pasted an IF THEN statement. I usually ended up being told that I'm missing an END; the fix is just going back to the include file and hitting return after the END; and it then compiles correctly.
  21. Is that as easy as saving them with a .px extension from my text editor? I'm also interested and best practices when it comes to the location of the include files. Currently, I have a central folder on my computer where I store all my plugin scripts. Each plugin has its own subfolder. Once the plugin is encrypted does it still need access to the files in this folder or does it become one all encompassing plugin file? I'll perform some tests in the days ahead.
  22. I believe a long while back I wrote a script that ended up being to many characters for the script editor. Since then, I've been using includes to break down my scripts into smaller pieces. I really like working this way, but is it possible to encrypt the script along with the referenced include files?
  23. got it! I was attempting to set the criteria individually in the database header cell. that was wrong. it was as simple as right clicking the database header row and setting the criteria. Thanks for your help.
  24. Kevin, Sorry, but I'm a little confused on how to setup the check criteria: =('Plugin Object Name'.'scheduleCheck'=TRUE'.'Field to display') anywhere close?


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