How many attributes can be attached to an entity
-
Does anyone know the maximum number of entities that you can store for a single entity.
Related to that I was also wondering how much data can be stored in a single attribute.
The reason I ask, is that I have a possible scenario that might have a little over 1000 attributes. Right now the data is stored in an external file, but ideally I'd like to be able to attach it to a SketchUp entity.
Now if attributes can contain enough data, well maybe I just need a few attributes, with a long text string as one of the attributes. That may actually be the best option.
-
I don't know the architectural limits, as I don't have access to the code. But, I would suspect 1000 would be no big deal. Perhaps time to write a loop and test it?
Todd
-
I'm not sure there's any published maximums, but it'll slow things down if you load it up ?
You can store attribute data as boolean [true/false], integer [1,2,3], float [1.23], string ["cat"] and mixed arrays [[true,1,2,"cat",1.23]] - but 'binary stuff' messes up - perhaps 'arrays' is the way to go ?
You have to test it with some mock attribs...
-
There's no limit (at least in the code).
RAM and HD space would be the limits. -
So I did a quick test on dumping a lot of data in one attribute. I did this via the text field on a Dynamic Component.
I copied a file I happen to have handy with 1,700,000 characters and 220,000 words.
It crunched on this for a minute or two, but didn't have an errors, saved fine.As I looked into it, it did truncate the file, but at a much higher number than I expected.
It took 524,000 character and 69,000 words. Those all exported to the CSV fine (although as you would expect if you use the reports, all one one line, as each entity has one line. Of course that wouldn't matter for my use. My ultimate goal would be to use the SU SDK to extract this out of a file, vs. having a rubyscript handle the export process.While I expect nobody ever runs into this, a very minor feature request would be a dialog box alerting me that my input is being truncated
-
Thanks for the input. I'm looking at storing annual operation schedule for equipment with the entity. While a basic schedule might have weekend and weekday on and off times, as well as run settings, an advanced setting could have unique numbers for every day of the year.
So I'm looking at the feasibility of storing this in SketchUp vs. in an external file. A complex project could have a hundreds of these objects in them. I'll do some tests to see if things behave, and also look into using a lot of small attributes, or a few very large attributes.
-
I'd store this in a proper database, perhaps linked to the Component with a single ID attribute; then bring the data in to SketchUp as needed.
One reason is then you would have access to the information for generating reports, etc. even if SketchUp is not running. Not to mention backing-up data and sharing it more easily.
-
@jhauswirth said:
There's no limit (at least in the code).
RAM and HD space would be the limits.Might sound like a silly question. But are you certain of that?
I believe there is a buffer overrun somewhere if you have large data attached as attributes somewhere in the handling of it inside Sketchup.
LightUp stores Lempel-Ziff compressed hex strings on entities and by trial and error, I came to the conclusion anything larger than 700000 bytes kills Sketchup. So I split up data into <700000 char chunks it works fine.
Advertisement