Jump to content

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

Link to comment

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?

Link to comment
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

Link to comment

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

Link to comment

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

Link to comment
  • 3 years later...

This Data Visualization changes the foreground color of a Fill. As the symbol only contains one object that has a foreground color (the Hatch) then it is the rectangle that is filled with a Hatch attribute that will change when you vary the data attached to the symbol. There is no secret sauce other than that.

Currently, there is no way to vary individual objects (that I know of) within a symbol based on the data that the symbol holds. Data Visualization, although clever and fantastically useful, is quite a blunt instrument.

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