Jump to content
  • 0
Grethe Connerth

Crop Area Viewport Change Default Green and Thick Line

Question

I would like to be able to customise the Default Crop Object in the Viewport and have it show up customised right from when opening the Viewport, rather than having to change it manually again and again.

 

Every time I go into a Viewport to add a Crop Object to my Design Layer by the steps below - it shows a thick green outline

 

Double Click on a Viewport --> Design Layer --> "ADD REFERENCE CROP OBJECT"

 

Now I know I can place it into a CLASS.

But still I would need to add the Crop Object every single time to a Class.

Which if you have hundreds of Viewports is rather time consuming.

 

Edited by Grethe Connerth

Share this post


Link to post

10 answers to this question

Recommended Posts

  • 0

Out of curiosity, why does this process occur so frequently in your workflow? How are you then using the reference crops?

Share this post


Link to post
  • 0

Hi Andy,

 

I have a few VW projects I am working on.

 

And when I started these I didn't work the way knowing what I know now setting up design layers and Viewports.

 

Anyways, now that I have to revise my VW project files, and there are a huge amount of design layers, of which I don't know which areas and which are related to the many Viewports.

 

So I need to kind of 'retrospectively' place a crop area to each design layer to identify which area I was working on.

Apologies as it may not make much sense the way I describe it, but it's a fool's errands to say the least...

 

Having a Crop Object not in that fat green line by default, but what I'd like ti to be I could give it not only a colour and thickness but also be dotted and so forth. 

 

  • Like 1

Share this post


Link to post
  • 0

I don’t think you can set defaults for that crop object.

 

What might work is to use the custom selection or custom modification tool to select and then modify all the crop objects in your file in one hit. You can even create a script from these tools which you can reuse and transfer to other files.

 

 

Share this post


Link to post
  • 0

Hi Boh,

 

you are way ahead to my level of VW knowledge !!!

 

Would you mind maybe sending me some screenshots of the how to's -->  custom selection or custom modification tool and the script?

Have never used any of these.

Many thanks in advance.

Share this post


Link to post
  • 0

Not in front of vw atm but both custom selection and custom mod are in the tools menu I think. The commands are similar. You activate it and it will ask you if you want to use it just this time or create a script. If you want to create a script it just asks you to name the script and place it in a script palette. The scripts and palettes are file resources that can be found in the RM under “scripts”.

 

The tools will then ask you to set criteria. I suggest colour and line weight for those crop objects. You can have up to 7 or 8 levels of criteria so you should be able to narrow it down to green polys of ehatever linewieght one the none class etc.
 

The custom selection tool will select any visible objects that meet that criteria. Once selected you can then edit them. 
 

The custom modification tool will not select the objects meeting that criteria but will let you edit the common characteristics of all the objects placed in the drawing (Visible or not) that meet the criteria you set. So that is probably a better bet.

 

If you create a class for the crops with the proffered class attributes of line type, weight etc. then use your custom mod script you should be able to make all the crops attributes by class and place them in your crop object class.

 

If I could actually write scripts I would make one that even does that last bit for you as well so it’s literally one dble click to clean up all those ugly green rectangles in a file.

 

Hopr that explains it. 
 

cheers

Share this post


Link to post
  • 0

Hey Grethe. Did you try the script idea? I was intrigued if it would work so tried it out and it 90% does.

 

Unfortunately the custom modification tool doesn't allow you to set object attributes by class. See video.


Is there a scripter out there who could edit the script in the attached file so that it modifies the crop objects and then also places them in a "Crop Objects" class with all attributes by class?

 

My test file also attached.

 

Cheers 

Modify Crop Object Script.vwx

Share this post


Link to post
  • 0

Try this script it sets the Class of the crop objects and the Pen and Opacity settings to By Class.

 

Procedure Crop_to_By_Class;

{September 3, 2020}
{©2020 Patrick Stanford pat@coviana.com}
{Licensed under the GNU Lesser General Public License}

{No Warranty Expressed of Implied. Use at your own risk.}

	Procedure Execute(H2:Handle);
		Begin
			SetClass(H2,'PTS Crop Objects');
			SetLSByClass(H2);
			SetLWByClass(H2);
			SetPenColorByClass(H2);
			SetOpacityByClassN(H2, True, True);
		End;
Begin
	ForEachObject(Execute,((INGROUP & INVIEWPORT & ((T=RECT)|(T=POLY)) & (LW=100) & (PF=1265))));
End;

Run(Crop_to_By_Class);

 

  • Like 1

Share this post


Link to post
  • 0

Works a treat thanks @Pat Stanford!

 

@Grethe Connerth. If you copy Pat's script then go and edit the one I sent in the file and paste it in it will place any crop objects in your file into a class called 'PTS Crop Objects'. You can set the class attributes how you want them. If you want to put the objects into a different class simply edit the script where it says 'PTS Crop Objects' to whatever class name you prefer.

 

You can import the script into other files or better put it into your project template file so it's always there when you need it.

 

Hope that all helps.

 

Cheers

  • Like 1

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
Answer this question...

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


 

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