Jump to content

MaxStudio

Member
  • Posts

    319
  • Joined

  • Last visited

Everything posted by MaxStudio

  1. Thanks mullin that is a great tip. I'll definitely try the Cmd-period trick the next time it happens. I have also noticed that if I bold any of my code it cause vectorworks to freeze when I run the script. I now only change font colors to organize my work.
  2. What might cause my keyboard shortcuts to stop working? has this ever happened to anyone after running a script?
  3. Thanks mike, that is definitely good advice, but this is part of a larger script that I am working on used to create a list of user defined layers which in turn are used to create a list of saved views. I could have the user manually hide the layers (as you have suggested) and then run the script,but that is just another step that I believe should be automated. basically a user will be open up the template, click on the scipt, type in a string "1st Floor", a list of layers will be created. Next, a set of Saved Views will be created using the recently developed list of layers. I can not rely on the user to always input the exact same string. I also can't rely on the user to only use the layers which the script develops.. there for I needed a way to hide all the layers so the script could properly create the saved views. Pat has helped me solve this problem.
  4. ok forget what I said about it not working... your script DOES work. I was watching the Navigation window while I ran the script. The visibilities of the layers did not change in the Navigation Window. Meaning the little eye icon did not become an 'x'. Then I decided to try it with items drawn on each layer. Then I ran the script... it worked. For some reason, even though the layers become hidden, the icon in the Navigation window does not change until I change to a different project window or a different program and then return to vectorworks. Just a little glitch. I think this will work tho! THANKS A LOT!!
  5. okay was able to find it online. "Not Equal"
  6. Hey Pat, The script compiled successfully, but it did not hide the layers. I'm going to use what you provided me as a starting point. silly question. What does the "<>" operator stand for? I think this is a great start. thanks again!
  7. Anyone know of a way to set all layers to "hidden"? I haven't been able to find anything. I think that if I can't get them to hide all at once... maybe there is a way to cycle through the layers one at a time, regardless of the layer name. I know in Vectorworks you can cylce through the layers using "Shift" and the Arrow keys. That being said I feel there should be some way to have a script cycle through the layers. If I can cycle through the layers I can set the visibility of each one to "hidden" individually and loop the script until all layers are hidden. See the problem is... i have developed a script which asks the user to input a string variable. Lets say the string variable is "1st Floor". The script then creates a list of design layers using the string variable: 1st Floor Openings 1st Floor Walls 1st Floor Shade I give each layer a handle and then assign the visibility of each. Then I create 3 saved views: 1st Floor Construction Plan 1st Floor Power/Telephone Plan 1st Floor Reflected Ceiling Plan then the script ends. Up until that point the script works fine. The problem is when I run the script a second time. If i run the script a second time the saved views will not be created correctly. Lets say I run the script again this time the string variable is "2nd Floor". The script then creates a list of design layers using the string variable: 2nd Floor Openings 2nd Floor Walls 2nd Floor Shade I give each layer a handle and then assign the visibility of each. Then I create 3 saved views: 2nd Floor Construction Plan 2nd Floor Power/Telephone Plan 2nd Floor Reflected Ceiling Plan These Saved Views are created incorrectly because I have no way of changing the visibility of the other "1st Floor" layers in the file. I don't want to have to rely on the name of the layer to hide it. The reason I don't want to rely on the name is because I'm not sure the names will always be the same. This is why I am looking for a way to hide all layers in the file.
  8. Wonderful I'm on the road to success! So far I have the script doing the following -User enters a string to name the layers -Creates a list of Layers -Sets the Scale of Each Layer -Sets the Visibility of The Layers that were created -Saves the View Now I need to figure out a way to set all layers in the active document to "Hidden" That way, when I run the script a second or third time i can hide all layers in the active document and start fresh. Any ideas?
  9. oh i found it, but i think this task is going to be harder than it seems... hmmm
  10. Yeah I agree with klinzey. i find its best to align everything first then I play with the edit fields to shift certain items. You also have to know which item is the anchor item. If you shift the anchor item all items aligned with it will shift too. so it is possible you have multiple shiftings.
  11. O thanks a lot pat! Now I just need to figure out the way to set the layer and class visibilities before I save the view. Any Idea? Derek
  12. I created a script that creates a list of layers. is it possible to also have this script create a list of saved views? I've given each layer a handle. If I knew how to create a saved view i could possibly use the handle to set the visibility of the layers. I just dont know if it is possible to create a saved view using a script...
  13. Exactly Charles. the tools i've been working on create windows and doors (2d only) that are specific to our office's needs. I'll definitely take a closer look into the vso thanks
  14. ok i got it to work as a command. I created a new menu within that menu is my command. when I the command is selected it runs my script. I would really love to make it tool rather than a command. Is the process that much more difficult? at the moment I'm also trying to figure out how to have one script access another using {&INCLUDE}: i want to make updating these scripts on everyone's computers a lot easier.
  15. ok so thats exaclty what I want to do. so how do i go about creating the command to access my vectorscript? where do I find my vectorscript listed in the workspace editor?
  16. so whats the difference between a tool and a command? I wrote the script in a text editor and then pasted it into the VectorScript Editor via the Resource Browser. It compiled fine and the script worked. Basically the script create a Modern Dialog Box with input fields and then uses the input values to create an object. Is this considered a tool or a command? Is there anyway for me to easily convert one to the other? I would really like to be able to utilize the code I have all ready developed. Thanks
  17. ok so normally i create all my scripts via the Resource Browser. I've recently tried creating a script via the VectorScript Plug-in Editor. I create a new plugin. I then select "script" and paste my scipt. I click "compile" and it compiles successfully. I then click "Done". Next I goto the Workspace Editor and find my new plugin tool. I select the new tool and place it in the 2D Tools of my workspace. Then I click "OK". The icon for the tool shows up in the 2D Tool palette. When I hover over the icon it gives me the name of my tool. The problem is when I click on the tool.... nothing happens. I've run this script through the resource browser and I know it works. What am I doing wrong? Thanks *contemplating pulling my last hair out*
  18. Hey Raymond I've tried creating the Inculde script, but I'm not sure how to save my other script to a vss file. I normally type up the script in a simple text editor. Then I copy and past the script to the VectorScript Editor and compile. How do I save the Script out as a separate file?
  19. I create my scripts using a simple text editor. I then copy and paste my scripts into the VectorScript Editor and then Compile. How do I create vss file for each script I develop?
  20. its basically pascal... Look up pascal tutorials to get an over view then cross refrence with the info at the following website: http://www.vectorlab.info/index.php?title=Main_Page thats what I've been doing. Sorry i have no info for you on your nurbs problem.
  21. so I write one script that has {$Include filename} and place it on each machine. I then write a second script "filename" and place it on the server. the script "filename" is the one I update? I think that is what you are saying Thanks Raymond
  22. Boy it sure would be nice to organize my design layers into folders... almost like the "shop-photo" program out there... I love the ability to be able to layer my drawing, but sometimes I have a lot of layers and would like to be able to organize them... am I missing something in vectorworks or is this just a wish of mine?
  23. I work in a small 10 person firm. I am the only one who writes and updates the scripts. I want to setup a template for the office that references my list of vector scripts. I hate going from computer to computer to update all the little changes I make to the scripts. Is there a way I can tell the template to reference 1 file? If it references the 1 file then all I have to do is update that file instead of going around the entire office importing scripts... Thanks in advance!
×
×
  • Create New...