Trying to port some older COM code to use the new managed API in C3D2013. If I use code like so:
StandardPointGroupQuery query = pg.GetQuery(); query.IncludeNumbers = "2,3,5,7"; pg.SetQuery(query);
Then if the PointGroup was already set to include at least 1 other point group, all is good. However, if the Point Group was set to NOT use other point groups you get an exception thrown with the message "The specified Point Group does not exist or is invalid".
It took some looking, but I found that the GetQuery() returns a query with 1 point group named "" when there are none set, thereby causing the subsequent error. If you just construct a new StandardPointGroupQuery object, no pg is added so no error is thrown (which is why the sample code on Isaac's page works without error). This can be worked around, but it really shouldn't need to be.
And this is the workaround:
StandardPointGroupQuery query = (StandardPointGroupQuery)pgroup.GetQuery(); //added to fix bug in initial release of C3D2013 if (query.PointGroups.Count == 1 && query.PointGroups.Equals("")) query.PointGroups.Clear();
Just bringing this back to get some attention as it is really a PITA to have to use my cleanup method everytime I use GetQuery().
I will take a look at it and check the status in 2014.
Was it reported earlier ? Is there any Change Request ID given to you againt this issue ?
I've only reported here, Partha. No, no change request has been made as far as I know.
I thought I had made a comment about this on your post showing how to use SetQuery on the DevBlog (July 5, 2012) but I don't see any comments now. Strange thing is this thread was started 2 days prior to your blog post, maybe I thought you had seen this which prompted your post.
Access a broad range of knowledge to help get the most out of your products and services.