<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Override rules creation in Archicad C++ API</title>
    <link>https://community.graphisoft.com/t5/Archicad-C-API/Override-rules-creation/m-p/286812#M5203</link>
    <description>Hi,&lt;BR /&gt;
&lt;BR /&gt;
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.&lt;BR /&gt;
&lt;BR /&gt;
Maxime</description>
    <pubDate>Thu, 29 Jun 2017 12:01:54 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2017-06-29T12:01:54Z</dc:date>
    <item>
      <title>Override rules creation</title>
      <link>https://community.graphisoft.com/t5/Archicad-C-API/Override-rules-creation/m-p/286808#M5199</link>
      <description>&lt;DIV class="actalk-migrated-content"&gt;Hi,&lt;BR /&gt;&lt;BR /&gt;I am digging in the Override_Test example project to see what the API lets us do in this field. &lt;BR /&gt;I am very surprised to realize that rules creation implies creating manually then saving their criterions as an XML string.&lt;BR /&gt;
&lt;PRE&gt;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 =
		"&amp;lt;?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"no\" ?&amp;gt;"
		"&amp;lt;CriterionExpression Mv=\"2\" Sv=\"1\"&amp;gt;"
			"&amp;lt;TextMatchType&amp;gt;1&amp;lt;/TextMatchType&amp;gt;"
			"&amp;lt;Size&amp;gt;1&amp;lt;/Size&amp;gt;"
			"&amp;lt;ClassGuid&amp;gt;C6EBD1BD-7702-46FF-8ED9-9CC37648A7C7&amp;lt;/ClassGuid&amp;gt;"
			"&amp;lt;CompositeCriterion Mv=\"2\" Sv=\"1\"&amp;gt;"
				"&amp;lt;LogicalOperator&amp;gt;2&amp;lt;/LogicalOperator&amp;gt;"
				"&amp;lt;CriteriaCount&amp;gt;1&amp;lt;/CriteriaCount&amp;gt;"
				"&amp;lt;ClassGuid&amp;gt;C6EBD1BD-7702-46FF-8ED9-9CC37648A7C7&amp;lt;/ClassGuid&amp;gt;"
				"&amp;lt;CompositeCriterion Mv=\"2\" Sv=\"1\"&amp;gt;"
					"&amp;lt;LogicalOperator&amp;gt;1&amp;lt;/LogicalOperator&amp;gt;"
					"&amp;lt;CriteriaCount&amp;gt;2&amp;lt;/CriteriaCount&amp;gt;"
					"&amp;lt;ClassGuid&amp;gt;B4B7B134-EC56-4D40-8D4C-71D7C5A2493A&amp;lt;/ClassGuid&amp;gt;"
					"&amp;lt;ElemTypeCriterion Mv=\"2\" Sv=\"3\"&amp;gt;"
						"&amp;lt;VBEF::CritToolType Mv=\"1\" Sv=\"0\"&amp;gt;"
							"&amp;lt;ElemRegistryRefId&amp;gt;1464421956&amp;lt;/ElemRegistryRefId&amp;gt;"
							"&amp;lt;ElemCreatorToolUnID&amp;gt;"
								"&amp;lt;MainGuid&amp;gt;4ABD0A6E-634B-4931-B3AA-9BEE01F35CDF&amp;lt;/MainGuid&amp;gt;"
								"&amp;lt;RevGuid&amp;gt;5585F21A-DE1C-164C-A64E-92CB48F79FA5&amp;lt;/RevGuid&amp;gt;"
							"&amp;lt;/ElemCreatorToolUnID&amp;gt;"
						"&amp;lt;/VBEF::CritToolType&amp;gt;"
						"&amp;lt;LogicalOperator&amp;gt;1&amp;lt;/LogicalOperator&amp;gt;"
					"&amp;lt;/ElemTypeCriterion&amp;gt;"
					"&amp;lt;ClassGuid&amp;gt;B4B7B134-EC56-4D40-8D4C-71D7C5A2493A&amp;lt;/ClassGuid&amp;gt;"
					"&amp;lt;ElemTypeCriterion Mv=\"2\" Sv=\"3\"&amp;gt;"
						"&amp;lt;VBEF::CritToolType Mv=\"1\" Sv=\"0\"&amp;gt;"
							"&amp;lt;ElemRegistryRefId&amp;gt;1146048338&amp;lt;/ElemRegistryRefId&amp;gt;"
							"&amp;lt;ElemCreatorToolUnID&amp;gt;"
								"&amp;lt;MainGuid&amp;gt;11E85B84-8DD1-491B-A2FE-337454A91545&amp;lt;/MainGuid&amp;gt;"
								"&amp;lt;RevGuid&amp;gt;91A61E93-32A8-BC46-A11A-5FB89256C651&amp;lt;/RevGuid&amp;gt;"
							"&amp;lt;/ElemCreatorToolUnID&amp;gt;"
						"&amp;lt;/VBEF::CritToolType&amp;gt;"
						"&amp;lt;LogicalOperator&amp;gt;1&amp;lt;/LogicalOperator&amp;gt;"
					"&amp;lt;/ElemTypeCriterion&amp;gt;"
				"&amp;lt;/CompositeCriterion&amp;gt;"
			"&amp;lt;/CompositeCriterion&amp;gt;"
		"&amp;lt;/CriterionExpression&amp;gt;";&lt;/PRE&gt;
I wanted to create this kind of "filters" automatically in my add-on.&lt;BR /&gt;&lt;BR /&gt;Thanks for your ideas.&lt;/DIV&gt;</description>
      <pubDate>Wed, 12 Jul 2023 18:48:36 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Archicad-C-API/Override-rules-creation/m-p/286808#M5199</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2023-07-12T18:48:36Z</dc:date>
    </item>
    <item>
      <title>Re: Override rules creation</title>
      <link>https://community.graphisoft.com/t5/Archicad-C-API/Override-rules-creation/m-p/286809#M5200</link>
      <description>Hi,&lt;BR /&gt;
&lt;BR /&gt;
Maybe  I don’t understand the problem well, so is the problem that at the code there is that note, which says you should save the XML from ARCHICAD and instead of that you would like to do this from your addon automatically? If this is the case, I think you can do it from the code, the comment just say that if you save it from ARCHICAD than the fromat of the XML will be surely in the correct form.&lt;BR /&gt;
&lt;BR /&gt;
Best, Regina</description>
      <pubDate>Wed, 31 May 2017 09:26:17 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Archicad-C-API/Override-rules-creation/m-p/286809#M5200</guid>
      <dc:creator>Regina Judak</dc:creator>
      <dc:date>2017-05-31T09:26:17Z</dc:date>
    </item>
    <item>
      <title>Re: Override rules creation</title>
      <link>https://community.graphisoft.com/t5/Archicad-C-API/Override-rules-creation/m-p/286810#M5201</link>
      <description>Hi,&lt;BR /&gt;
&lt;BR /&gt;
Thanks for your answer.&lt;BR /&gt;
&lt;BR /&gt;
I can't figure out how to easily create this kind of XML string in my code...&lt;BR /&gt;
How am I supposed to know what to put for instance in the CompositeCriterion attributes (Mv, Sv) or in LogicalOperator (what corresponds to 1,2, etc) ? &lt;BR /&gt;
&lt;BR /&gt;
Are there any guidelines to build the XML criterion ? Has ever someone tried to do it by the code ?</description>
      <pubDate>Thu, 01 Jun 2017 08:13:08 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Archicad-C-API/Override-rules-creation/m-p/286810#M5201</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-06-01T08:13:08Z</dc:date>
    </item>
    <item>
      <title>Re: Override rules creation</title>
      <link>https://community.graphisoft.com/t5/Archicad-C-API/Override-rules-creation/m-p/286811#M5202</link>
      <description>Hi,&lt;BR /&gt;
I asked about it from one of my colleagues. Now there is no detailed documentation about this XML creation and the recommended way to use it is that to save the XML from the ARCHICAD.&lt;BR /&gt;
Is there any specific reason why you would like to create this XML from your code? We would like to know better how developers want to use this feature in order to think about how we can improve it in the future.&lt;BR /&gt;
Thanks!&lt;BR /&gt;
Regina</description>
      <pubDate>Thu, 01 Jun 2017 09:11:40 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Archicad-C-API/Override-rules-creation/m-p/286811#M5202</guid>
      <dc:creator>Regina Judak</dc:creator>
      <dc:date>2017-06-01T09:11:40Z</dc:date>
    </item>
    <item>
      <title>Re: Override rules creation</title>
      <link>https://community.graphisoft.com/t5/Archicad-C-API/Override-rules-creation/m-p/286812#M5203</link>
      <description>Hi,&lt;BR /&gt;
&lt;BR /&gt;
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.&lt;BR /&gt;
&lt;BR /&gt;
Maxime</description>
      <pubDate>Thu, 29 Jun 2017 12:01:54 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Archicad-C-API/Override-rules-creation/m-p/286812#M5203</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-06-29T12:01:54Z</dc:date>
    </item>
    <item>
      <title>Re: Override rules creation</title>
      <link>https://community.graphisoft.com/t5/Archicad-C-API/Override-rules-creation/m-p/286813#M5204</link>
      <description>&lt;BLOCKQUOTE&gt;mvallee wrote:&lt;BR /&gt;Hi,&lt;BR /&gt;
&lt;BR /&gt;
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.&lt;BR /&gt;
&lt;BR /&gt;
Maxime&lt;/BLOCKQUOTE&gt;

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.&lt;BR /&gt;
&lt;BR /&gt;
Best, Akos</description>
      <pubDate>Fri, 30 Jun 2017 10:55:43 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Archicad-C-API/Override-rules-creation/m-p/286813#M5204</guid>
      <dc:creator>Akos Somorjai</dc:creator>
      <dc:date>2017-06-30T10:55:43Z</dc:date>
    </item>
    <item>
      <title>Re: Override rules creation</title>
      <link>https://community.graphisoft.com/t5/Archicad-C-API/Override-rules-creation/m-p/286814#M5205</link>
      <description>The idea was to do all the work automatically for the user, not to force him to start by creating a filter manually. &lt;BR /&gt;
&lt;BR /&gt;
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 ?&lt;BR /&gt;
&lt;BR /&gt;
To be clearer I want the user to select in my UI :&lt;BR /&gt;
1) Archicad objects categories (walls, doors)&lt;BR /&gt;
2) a parameter of that/these category(ies) to analyse&lt;BR /&gt;
3) some initial views to copy&lt;BR /&gt;
&lt;BR /&gt;
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.&lt;BR /&gt;
&lt;BR /&gt;
With the current state of things, it seems quite impossible to achieve that, doesn't it ?</description>
      <pubDate>Mon, 03 Jul 2017 09:47:28 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Archicad-C-API/Override-rules-creation/m-p/286814#M5205</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-07-03T09:47:28Z</dc:date>
    </item>
    <item>
      <title>Re: Override rules creation</title>
      <link>https://community.graphisoft.com/t5/Archicad-C-API/Override-rules-creation/m-p/286815#M5206</link>
      <description>&lt;BLOCKQUOTE&gt;mvallee wrote:&lt;BR /&gt;The idea was to do all the work automatically for the user, not to force him to start by creating a filter manually. &lt;BR /&gt;
&lt;BR /&gt;
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 ?&lt;BR /&gt;
&lt;BR /&gt;
To be clearer I want the user to select in my UI :&lt;BR /&gt;
1) Archicad objects categories (walls, doors)&lt;BR /&gt;
2) a parameter of that/these category(ies) to analyse&lt;BR /&gt;
3) some initial views to copy&lt;BR /&gt;
&lt;BR /&gt;
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.&lt;BR /&gt;
&lt;BR /&gt;
With the current state of things, it seems quite impossible to achieve that, doesn't it ?&lt;/BLOCKQUOTE&gt;

Hi,&lt;BR /&gt;
&lt;BR /&gt;
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.&lt;BR /&gt;
&lt;BR /&gt;
Best, Akos</description>
      <pubDate>Thu, 20 Jul 2017 11:47:41 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Archicad-C-API/Override-rules-creation/m-p/286815#M5206</guid>
      <dc:creator>Akos Somorjai</dc:creator>
      <dc:date>2017-07-20T11:47:41Z</dc:date>
    </item>
    <item>
      <title>Re: Override rules creation</title>
      <link>https://community.graphisoft.com/t5/Archicad-C-API/Override-rules-creation/m-p/286816#M5207</link>
      <description>&lt;BLOCKQUOTE&gt;Akos wrote:&lt;BR /&gt;&lt;BLOCKQUOTE&gt;mvallee wrote:&lt;BR /&gt;The idea was to do all the work automatically for the user, not to force him to start by creating a filter manually. &lt;BR /&gt;
&lt;BR /&gt;
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 ?&lt;BR /&gt;
&lt;BR /&gt;
To be clearer I want the user to select in my UI :&lt;BR /&gt;
1) Archicad objects categories (walls, doors)&lt;BR /&gt;
2) a parameter of that/these category(ies) to analyse&lt;BR /&gt;
3) some initial views to copy&lt;BR /&gt;
&lt;BR /&gt;
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.&lt;BR /&gt;
&lt;BR /&gt;
With the current state of things, it seems quite impossible to achieve that, doesn't it ?&lt;/BLOCKQUOTE&gt;

Hi,&lt;BR /&gt;
&lt;BR /&gt;
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.&lt;BR /&gt;
&lt;BR /&gt;
Best, Akos&lt;/BLOCKQUOTE&gt;

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.</description>
      <pubDate>Mon, 18 Sep 2017 09:03:41 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Archicad-C-API/Override-rules-creation/m-p/286816#M5207</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-09-18T09:03:41Z</dc:date>
    </item>
    <item>
      <title>Re: Override rules creation</title>
      <link>https://community.graphisoft.com/t5/Archicad-C-API/Override-rules-creation/m-p/286817#M5208</link>
      <description>&lt;BLOCKQUOTE&gt;mvallee wrote:&lt;BR /&gt;
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.&lt;/BLOCKQUOTE&gt;

I'm sorry, but we don't have any documentation on that.&lt;BR /&gt;
&lt;BR /&gt;
Best, Akos</description>
      <pubDate>Thu, 21 Sep 2017 16:35:09 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Archicad-C-API/Override-rules-creation/m-p/286817#M5208</guid>
      <dc:creator>Akos Somorjai</dc:creator>
      <dc:date>2017-09-21T16:35:09Z</dc:date>
    </item>
    <item>
      <title>Re: Override rules creation</title>
      <link>https://community.graphisoft.com/t5/Archicad-C-API/Override-rules-creation/m-p/286818#M5209</link>
      <description>Hi,&lt;BR /&gt;
&lt;BR /&gt;
I am writing to know if someone in ArchiCAD development team would be able to give us a description of how the criterionXML string used in &lt;PRE&gt;typedef struct {
	API_Guid						guid;
	GS::UniString					name;
	API_OverrideRuleStyle			style;
	GS::UniString					criterionXML;
} API_OverrideRule;
&lt;/PRE&gt; is computed.&lt;BR /&gt;
&lt;BR /&gt;
I cannot imagine you don't have a document describing this. Without a mean to programmatically describe a rule criterion, I really don't see what's the point to give access to some functions like ACAPI_Override_CreateOverrideRule.&lt;BR /&gt;
&lt;BR /&gt;
Thanks in advance for your help.&lt;BR /&gt;
&lt;BR /&gt;
Maxime</description>
      <pubDate>Thu, 15 Mar 2018 17:01:24 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Archicad-C-API/Override-rules-creation/m-p/286818#M5209</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2018-03-15T17:01:24Z</dc:date>
    </item>
    <item>
      <title>Re: Override rules creation</title>
      <link>https://community.graphisoft.com/t5/Archicad-C-API/Override-rules-creation/m-p/286819#M5210</link>
      <description>Just to let you know, both Regina and Akos are from GRAPHISOFT and are in the ARCHICAD Development team. You can see the "GRAPHISOFT" text next to their User Name.</description>
      <pubDate>Sun, 18 Mar 2018 16:04:23 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Archicad-C-API/Override-rules-creation/m-p/286819#M5210</guid>
      <dc:creator>Laszlo Nagy</dc:creator>
      <dc:date>2018-03-18T16:04:23Z</dc:date>
    </item>
    <item>
      <title>Re: Override rules creation</title>
      <link>https://community.graphisoft.com/t5/Archicad-C-API/Override-rules-creation/m-p/286820#M5211</link>
      <description>Thank you for your observation. &lt;BR /&gt;
&lt;BR /&gt;
So can anyone from Graphisoft, whoever he/she is, help me regarding this ?</description>
      <pubDate>Tue, 27 Mar 2018 11:45:50 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Archicad-C-API/Override-rules-creation/m-p/286820#M5211</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2018-03-27T11:45:50Z</dc:date>
    </item>
  </channel>
</rss>

