Jump to content
Sign in to follow this  
hong

Edit Save View

Recommended Posts

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.

Share this post


Link to post

Occasionally one may want to include a script to a view change, such as changing class attributes, layer scales or font sizes.

Share this post


Link to post

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

Share this post


Link to post

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

Share this post


Link to post

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

Share this post


Link to post

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

Share this post


Link to post

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

Share this post


Link to post

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

Share this post


Link to post

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Sign in to follow this  

 

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