hong Posted September 21, 2004 Share Posted September 21, 2004 Could somebody tell me why there is a button 'edit script' on right top of 'Edit Save View' pop up menu? I am just curious. Quote Link to comment
Petri Posted September 23, 2004 Share Posted September 23, 2004 Occasionally one may want to include a script to a view change, such as changing class attributes, layer scales or font sizes. Quote Link to comment
PeterT Posted September 27, 2004 Share Posted September 27, 2004 Petri, Is this documented anywhere? I have posted this question before as well and never gotten any response. Since the edit sheet script itself does not show in the editor, if you are adding to the script which cannot be seen, would you add a stand alone script with its own set of variables, begin, end, and run, statements? Would the added script execute before or after the actual edit sheet script? If you add something contradictory to the edit sheet script itself, would it replace that item in the script, would it generate a VectorScript error, or would it just ignore it? Thanks, Peter Quote Link to comment
MullinRJ Posted September 28, 2004 Share Posted September 28, 2004 Your questions are valid, but I don't believe they are documented. I think they would best be answered by attempting explicit examples. quote: ...would you add a stand alone script with its own set of variables, begin, end, and run, statements?Yes, unless you don't use any variables. Then you can just have some statements without Begin, End and Run. Treat it as a normal script. quote: Would the added script execute before or after the actual edit sheet script?Before. I just tried a quick example. quote: If you add something contradictory to the edit sheet script itself, would it replace that item in the script, would it generate a VectorScript error, or would it just ignore it? When you say contradictory, what did you have in mind? Raymond Quote Link to comment
hong Posted September 28, 2004 Author Share Posted September 28, 2004 Yes, an explicit example will be appreciated. Quote Link to comment
PeterT Posted September 29, 2004 Share Posted September 29, 2004 Raymond, I guess I was thinking along the lines of adding a script which hides a layer when the edit sheet script itself is set to show the layer, for example. I am not quite sure why I would want to do that in particular, I am just trying to gain an understanding of how this feature works so I could figure out how to use it to my advantage. Thanks, Peter Quote Link to comment
patman Posted October 1, 2004 Share Posted October 1, 2004 Well, changing the visibility of layers and classes with the script in a View seams conflicted and redundant, however, you could do it if you want. A more useful task for this would be to change the attributes of a class. For example, objects using the class attributes for a class set to a solid red line can be changed to a dashed green line. You may also want to reorder the stacking of your layers. If you are familiar with VS then try putting in a script that changes a classes' attribute in there and then build from there... Patrick Quote Link to comment
PeterT Posted October 1, 2004 Share Posted October 1, 2004 Seems good to discuss these things when no documentation exists. Just through this discussion I have already found a few good uses for this feature. For example, we plot some sheets using layer colors, and others without. It is nice to know now that I can now save my sheet with with a SetPref call added and avoid having to remeber to change the document preferences each time before I plot. This could also be done for the Black & White Printing preference. Thanks, Peter Quote Link to comment
MullinRJ Posted October 2, 2004 Share Posted October 2, 2004 I have never found a use in my work for placing a script in a View, except for running a quick and dirty one time script without creating another VS routine on a palette. Just because something is available, doesn't mean it needs to be used. The original question asks, "Why is this useful?" Patrick may have some appropriate applications, but for the most part, it's not an integral facet of VW. However, it is a nice feature if you can find a use for it. Raymond Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.