Jump to content

How to calculate a worksheet limited to a viewport?


Charlot

Recommended Posts

Hello,

I try to create a worksheet with only data of a viewport, and not the entire drawing.

As you can see on the screenshot, the count is wrong, and it's logical because it's based on a layer which is "bigger" than the viewport.

How to force the worksheet to calculate only on the viewport?

 

Best,

Charlot

 

1553647604_Capturedecran2021-01-09a17_15_56.thumb.png.b58ff5d040082fd28cdf2dcfc3fbc79b.png

Link to comment

A viewport is only a snapshot of the drawing, so you cannot parse its data. 
 

I would recommend on reworking your layer or class structure to isolate the desired objects, rather than depending on your viewport crop. 
 

The worksheet does have a Location criteria — if I recall, this will look for objects within a named polygon. 

  • Like 1
Link to comment

Thanks a lot @JBenghiat for your quick answer!

Of course I can work with new class, but this viewport is just a detail of a part of the drawing, and for me it's no logical to separate every symbols on one class...

 

However, the location criteria is a good solution, I've drawn a rectangle with a name, and affected it to an invisible class.

And it's perfect for what I want to do!!

 

Regards,

Charlot

Link to comment

To expand on Josh's suggestions, if you give the Viewport Crop Object a Name at the bottom of the OIP,  then you can add a criteria of

 

Loc='Enter the crop object name here) and you will be limited to objects that are within the viewport crop. Objects that are only partially in the crop area may or may not display depending on where the insertion point is.

  • Like 3
Link to comment
  • 2 months later...

@Pat Stanford @JBenghiat...Can I ask a related question? Your comment said how you can limit a worksheet data to a specific crop...But can I have a worksheet report back which crop an object is in?

use: I'm working on a large ConnectCAD file. I'd like my cable report list have a column telling the installers which page the cable is on. I've done something similar before with spaces, but that adds another layer of complexity to the project!

Link to comment

Unfortunately, no you can't have an object report what space it is in. 

 

The LOC command effectively checks each object in the drawing to see if the bounding box of the object matches with the boundary of the LOC object. There is no link between the LOC object and the other drawing object(s). LOC objects don't even have to be unique. They can overlap (or even be duplicates, but I can't think of a reason you would want that).

 

You won't get a live link, but it would be possible to write a script that given a list of LOC objects would compare each object in the drawing to those LOCS and store the name of the LOC in a record. But the script would have to be rerun after changes are made or the information could be out of date.

 

 

Link to comment
17 minutes ago, Pat Stanford said:

Unfortunately, no you can't have an object report what space it is in. 

GetSpaceNameForObj does that, no? Only one has to be very careful with z values of objects and spaces, so that everything is included.

 

Link to comment

I'm using Spaces, Custom Space Name and the =GetSpaceNameForObj command, and it works great. I set my space "height" to be 10 (-1 to +9) just to catch if anything was mis-aligned with 3d geometry.

 Does't seem to bog the file down like I feared it would. Actually lists both Spaces (source and destination) if I use the  "Arrow" Circuit Type, which is very useful.

The only annoying thing I've noticed is that if I have a circuit and use the "Arrow" Circuit Type...if the "path" of that circuit "passes over" another space, it also lists that space in my report. Maybe just need to re-arrange a few things. 

looping in @Conrad Preen...maybe he'll find this thread useful! 

Link to comment
  • Vectorworks, Inc Employee

@livespace josha I love this kind of ingenuity! The combination of Spaces and Circuits hasn't been evaluated by our team but it certainly is interesting. Yes Circuits have a path regardless of the drawing style you choose. So there will be limitations as a result. Definitely food for thought. As you know we listen to what you say and this feeds into new features. Thanks !!!

 

Conrad

Link to comment

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.

×
×
  • Create New...