Jump to content

Hello Community!

This Saturday, April 11, from 9am – 1pm EDT we will be performing maintenance on the Vectorworks Community Board. During this time, the site will be unavailable.

Mike Rock

Modifying objects by record value

Recommended Posts

I'm trying to clean up a bit of my workflow and would like to explore 'Modifying objects by record value' I am working on my truck pack symbols for the entertainment industry. I have a 2D symbol for each 'standard' size case that has 2 lines of text and a case number linked to a record. I'm very happy with how that all works. I then have another version of each size for when they get doubled stacked that has "Double Stacked" in text around the edges. Then I have a third version of each size with a pink stripe on it to denote it as spare.

 

It works, maybe a bit clunky but it works. I would like to reduce the number of symbols I have to use and add 2 boolean fields to the record. One for if it is stacked and another for if it is spare. Ideally this would just toggle the viability of the text or the pink stripe.

 

I've read the help file for modifying objects by record value and can almost get it close to what I want for a rectangle but not a rectangle in a symbol.

 

When I attach my record to a rectangle and then modifying object by record value, set few color ranges and then clink ok the rectangle changes colors as I would expect BUT when I update the color field in the record it does not refresh the rectangles color, that only happens when I click tools>records>MBR> and then click ok when the MBR dialog pops up.

 

Am I trying to use the tool in a way it wasn't intended? Or am I missing a step...

Share this post


Link to post

To be honest, the best tool for this would be the new data visualisation function. Are you on 2020 yet? This will change the attributes of any object based on the record data it holds.

Share this post


Link to post

I'm not sure you can change the attributes of geometry inside a symbol.  I've never used this feature in a real drawing, so I may be wrong.  

 

 

 

Share this post


Link to post

I think @markdd has the easiest solution in Data Visualization. Just attach a record with a couple of boolean fields and change the color/lineweight when necessary. But I don't think that will show on the design layer and only in a Viewport.

 

Alternatively, if your graphics are simple (or you have extra time on your hands), you could change from symbols to creating/using a PIO (Plug-in Object) that would let you change the appearance when the fields are checked. You could actually use a single PIO that also took the standard dimensions as part of the Plug-in Parameters.  Save the different "standard" versions as Red Symbols (that convert back to a PIO when placed in the drawing) and you would have a pretty easy system.

 

Can you show us a sample of what the three symbol types look like?

Share this post


Link to post
4 hours ago, Pat Stanford said:

But I don't think that will show on the design layer and only in a Viewport.

@Pat, in 2020 it will also work on design layers.

Share this post


Link to post
6 hours ago, Pat Stanford said:

Can you show us a sample of what the three symbol types look like?

Ignore the color field for now, that was used to test the link between the record and the managed field. 

 

I'd love to start getting into PIOs but it is uncharted territory for me. This does seem like a good starter project, and I have a bit of time on my hands....

 

I am running 2020 so I'll look into Data Visualization.

VW Help Road Case.png

Share this post


Link to post
4 hours ago, Peter Vandewalle said:

@Pat, in 2020 it will also work on design layers.

@Peter Vandewalle Thanks Peter, So hard to keep track of all the changes between versions.

  • Like 1

Share this post


Link to post

@Mike Rock Where is the insertion point of your symbols? Center? Or a corner?

 

This will be a very easy PIO. It is a great place to start in learning to program.

  • Like 1

Share this post


Link to post

@Pat Stanford left edge center. I can handle it being anywhere if that makes another step easier.

 

I'm playing with the Data Visualization ( a big thanks to Bill Vincent at MegaBitsNZ for this video) and I can get it to color every rectangle in the symbol as I would expect. However I seem to have run into a road block where I can't control the attributes of a specific rectangle in the symbol, even when I use class as one of the Object Criteria. My hunch is that because the pink stripe has no record assigned to it the pink stripe doesn't have a record to check for display criteria.

 

If I assign a record to the stripe the colors change as expected but I can only edit the record in the symbol. Hard to explain but its like there is a nesting issue....

 

I'll look for some PIO examples to learn from.

Share this post


Link to post

You can get it working on classes as well. Make sure that the shape is set to Class Attributes. 

 

You will need to run multiple Data Visualisations. One for record data and one for Function Data for the class.

 

Just tried it in a symbol and at works perfectly.

 

File attached.

Data Visualisation.vwx

Share this post


Link to post

@markdd Thanks for the example file. I think I might be missing something, I can only get all the symbols to do the same thing. And to change which

 

My goal is to be able to use a symbol for the basic shape and be able to change the properties of each instance by the attached record to the symbol. Like how link text to record works but for things like fill color of a specific shape.

Share this post


Link to post

My mistake. Sorry, misread your earlier post. I'll have a think and let you know if I come up with something!

 

 

Share this post


Link to post

I have managed to dream up a way of changing an element of a symbol using data visualisation. Does it need to be more than one?

 

 

 

 

Data Visualisation.vwx

Share this post


Link to post
5 hours ago, markdd said:

I have managed to dream up a way of changing an element of a symbol using data visualisation. Does it need to be more than one?

 

 

 

 

Data Visualisation.vwx 107.2 kB · 1 download

You are a star. That is what I am after. Now if you'll excuse me while I reverse engineer this to apply it to my own symbols 😉 

Share this post


Link to post

@markdd Thanks, but I think I figured it out. I haven't dealt with Fore Color and Back Color before but that is a very clever way to handle this issue. Thanks for your help!

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.


 

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