Hi every body, I'm trying to modify an existing point group via my code. I construct a new CustomPointGroupQuery object, and generate a custom query string like below and assign it to the object.
query="(PointNumber=1-9282) NOT((PointEasting=695248.1184 AND PointNorthing=4025686.4833) OR (PointEasting=695251.7211 AND PointNorthing=4025692.3572))";
When I try to set the CustomPointGroupQuery object to my pointgroup, an exception is thrown:"Invalid value for property"
CustomPointGroupQuery cpgq = new CustomPointGroupQuery(); PointGroup pg = tr.GetObject(pgids, OpenMode.ForRead) as PointGroup; string currquery = pg.GetQuery().QueryString; cpgq.QueryString = ""; currquery += " NOT("; string query = "";
#region Generating Query String //Some Code to generate a query string (query object) #endregion cpgq.QueryString = currquery + query + ")"; pg.SetQuery(cpgq);
I also tryed to substitute "PointEasting" And "PointNorthing" properties to "PointElevation" as is stated at an example in the "AutoCAD Civil 3D API Developers Guide", but got the same error.
Could anyone help me, please? I'll appreciate that.
I think it's failing because of query string with this >>>PointNumber=1-9282
You need to change it to someting like this : (PointNumber>=1 AND PointNumber<=9282)
You could see how this query string is formed here :
Hope his helps.