Message 1 of 2
Help Request on PointGroup Custom Query
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
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[0], 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.