For that geometrically based element numbering, I have already scripted for "along path", "bottom to top", "by nearest neighbour", "by distance from", etc to sequentially number the instances of a kind of element in a model, and write the unique instance value to an Item Type Property. However, I wonder if it is possible to get an Item Type Expression to self report it's own instance's "count so far" value.
While each element obviously has a unique Element ID in the file, I would want to count each element of it own kind with its own sequence number without resorting to code. eg. Item Type "Parking Bay" 1,2,3,4,... Item Type "Tree cell" 1,2,3,4,...
I realise this is not ideal for every situation (eg. where the sequence of numbering is governed by some geometric relationship, and not necessarily the order of element as stored in the file) but I can see where it would be useful to apply a natural increment.
Regards
Robert
Thanks Jon And Jan.
As you say the only way I can see to do this at the moment is to code for it - at which point you have more control & options over the scope & methods that apply to counting things.
It just seemed to me there is enough info in the active model for an expression to produce a basic sequential instance value.
Robert Jones said:It just seemed to me there is enough info in the active model for an expression to produce a basic sequential instance value
This is another occasion where a query language for EC Schemas and Item Types would be useful. That is, something analogous to an SQL query like
SELECT COUNT(*) FROM MyItemType
Currently, the only query mechanism for Item Types is by constructing a Report. However, the query used in a Report cannot be used elsewhere.
If you agree that a query language for EC Schemas and Item Types would be valuable, please vote for this Idea! Perhaps Mangesh.Shelar would like to comment?
Regards, Jon Summers LA Solutions