2017-05-22 11:12 AM - last edited on 2023-07-12 08:48 PM by Doreena Deng
API_OverrideRule rule; rule.name = "Transparent surface for Windows and Doors"; // NOTE: to get the proper criterion XML, go to ARCHICAD and save the wanted override rule as XML // Criterion XML: Element Type is Window or Door rule.criterionXML = "<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"no\" ?>" "<CriterionExpression Mv=\"2\" Sv=\"1\">" "<TextMatchType>1</TextMatchType>" "<Size>1</Size>" "<ClassGuid>C6EBD1BD-7702-46FF-8ED9-9CC37648A7C7</ClassGuid>" "<CompositeCriterion Mv=\"2\" Sv=\"1\">" "<LogicalOperator>2</LogicalOperator>" "<CriteriaCount>1</CriteriaCount>" "<ClassGuid>C6EBD1BD-7702-46FF-8ED9-9CC37648A7C7</ClassGuid>" "<CompositeCriterion Mv=\"2\" Sv=\"1\">" "<LogicalOperator>1</LogicalOperator>" "<CriteriaCount>2</CriteriaCount>" "<ClassGuid>B4B7B134-EC56-4D40-8D4C-71D7C5A2493A</ClassGuid>" "<ElemTypeCriterion Mv=\"2\" Sv=\"3\">" "<VBEF::CritToolType Mv=\"1\" Sv=\"0\">" "<ElemRegistryRefId>1464421956</ElemRegistryRefId>" "<ElemCreatorToolUnID>" "<MainGuid>4ABD0A6E-634B-4931-B3AA-9BEE01F35CDF</MainGuid>" "<RevGuid>5585F21A-DE1C-164C-A64E-92CB48F79FA5</RevGuid>" "</ElemCreatorToolUnID>" "</VBEF::CritToolType>" "<LogicalOperator>1</LogicalOperator>" "</ElemTypeCriterion>" "<ClassGuid>B4B7B134-EC56-4D40-8D4C-71D7C5A2493A</ClassGuid>" "<ElemTypeCriterion Mv=\"2\" Sv=\"3\">" "<VBEF::CritToolType Mv=\"1\" Sv=\"0\">" "<ElemRegistryRefId>1146048338</ElemRegistryRefId>" "<ElemCreatorToolUnID>" "<MainGuid>11E85B84-8DD1-491B-A2FE-337454A91545</MainGuid>" "<RevGuid>91A61E93-32A8-BC46-A11A-5FB89256C651</RevGuid>" "</ElemCreatorToolUnID>" "</VBEF::CritToolType>" "<LogicalOperator>1</LogicalOperator>" "</ElemTypeCriterion>" "</CompositeCriterion>" "</CompositeCriterion>" "</CriterionExpression>";I wanted to create this kind of "filters" automatically in my add-on.
2017-05-31 11:26 AM
2017-06-01 10:13 AM
2017-06-01 11:11 AM
2017-06-29 02:01 PM
2017-06-30 12:55 PM
mvallee wrote:Then I would recommend setting up one filtered view manually, export that as XML, then use that XML as a template to create other views.
Hi,
I would like to automize the creation of filtered views, based on some user settings (parameters to filter, initial views to copy, ...) so I need a way to represent/declare a filter criterion with the API.
Maxime
2017-07-03 11:47 AM
2017-07-20 01:47 PM
mvallee wrote:Hi,
The idea was to do all the work automatically for the user, not to force him to start by creating a filter manually.
Even if I ask him to do it, how am I supposed to know how to modify this XML criterion later, if there is no doc about it ?
To be clearer I want the user to select in my UI :
1) Archicad objects categories (walls, doors)
2) a parameter of that/these category(ies) to analyse
3) some initial views to copy
Then the plugin would create copies of the selected views, then create and apply on the copies some colored filters to represent each detected value for the selected parameter.
With the current state of things, it seems quite impossible to achieve that, doesn't it ?
2017-09-18 11:03 AM
Akos wrote:Ok, but do you have a document that explains how the XML data is written ? Without it, the work is going to be very difficult.mvallee wrote:Hi,
The idea was to do all the work automatically for the user, not to force him to start by creating a filter manually.
Even if I ask him to do it, how am I supposed to know how to modify this XML criterion later, if there is no doc about it ?
To be clearer I want the user to select in my UI :
1) Archicad objects categories (walls, doors)
2) a parameter of that/these category(ies) to analyse
3) some initial views to copy
Then the plugin would create copies of the selected views, then create and apply on the copies some colored filters to represent each detected value for the selected parameter.
With the current state of things, it seems quite impossible to achieve that, doesn't it ?
It seems to be possible, but there's no easy way, because you have to figure out the mapping of each and every parameter beforehand. For that I would create a specific rule for every element type by hand, dump the rule to an XML file, and create a mapping out of that, which can be used later to construct the filters you want.
Best, Akos
2017-09-21 06:35 PM
mvallee wrote:I'm sorry, but we don't have any documentation on that.
Ok, but do you have a document that explains how the XML data is written ? Without it, the work is going to be very difficult.