Adding Cogo Points to Group with query - bug in Civil 3D 2024?

Adding Cogo Points to Group with query - bug in Civil 3D 2024?

Anton_Huizinga
Advocate Advocate
497 Views
2 Replies
Message 1 of 3

Adding Cogo Points to Group with query - bug in Civil 3D 2024?

Anton_Huizinga
Advocate
Advocate

According to the API, Cogo Points can be added to a Group with a query like this:

StandardPointGroupQuery query = new StandardPointGroupQuery();
query.IncludeNumbers = "1,3,7";
pointGroup.SetQuery(query);

If you want to add points 1, 3 and 7 to the group.

 

Up to Civil 3D 2023 this worked fine, but since Civil 3D 2024 strange things happens. Only the first point is added to the group. 

 

If I add a new point, the query is build like this:

Anton_Huizinga_0-1710319621865.png

Which work in Civil 3D 2023, but in Civil 3D 2024 I get an exception:

Anton_Huizinga_1-1710319656744.png

 

If I manually edit the Point Group in Civil 3D, I cannot include Point Numbers separated by a comma only (which does work in Civil 3D 2023 btw). If I press the OK button, I get a Command Line warning that the type is not right (in Dutch, which is the OS language, while Civil 3D is English):

Command: Type komt niet overeen.    ( Point Number = 3,4,9 )

But if I include a range with a dash, the query is accepted, even combined with comma separated values:

Anton_Huizinga_2-1710319972427.png

 

It seems like Civil 3D 2024 expects at least one dash, while in prior versions it was not mandatory. I don't know why Autodesk changed it in the application, it worked for years without any trouble. Anyone who has a clue how to solve this or bypass it? Of course I can see if I add a query with a dash, but it can happen dat only non-sequential ranges must be added. 

0 Likes
498 Views
2 Replies
Replies (2)
Message 2 of 3

Jeff_M
Consultant
Consultant

I just tested my code in Civil 3D 2024.2, picking 4 points in the drawing and adding them to a point group:

285, 290, 316, 328

No issue encountered. Since i noticed I hadn't installed Update 3, I did so, then retested, same, perfect, result.

 

So I went and looked at the code which Sinc had created many years ago for creating the point list for use in the point groups. This code has worked great since day 1, and what it does is add a space after each comma. This can be seen in the points I listed above, that was a direct copy-paste from the point group properties.

 

Jeff_M, also a frequent Swamper
EESignature
0 Likes
Message 3 of 3

Anton_Huizinga
Advocate
Advocate

Thanks Jeff, for your thorough testing! One colleague also experiences this issue, and he claimed that included numbers '1,5' changed into '2' (which I can't confirm btw). That, and your confirmation that it should work and the assumption you live in an English-speaking country, rised the thought that it might something to do with country settings. The country I live in, uses a comma as decimal separator. I have changed it now and suddenly I am able to add included point numbers, separated with a comma (btw, the extra space is not an issue).

 

In Civil 3D 2023 and prior I do not have problems with the comma, only in 2024 (and just confirmed in 2025 Bèta too). Because you use a point as decimal separator, you will not run into this issue. 

 

Unfortunately there seems no workaround and I am not able to add point numbers this way. Maybe with some exotic query, this seems to work:

Anton_Huizinga_0-1710362223778.png

 

What makes it even more silly, the Exclude tab is working without any issue. If I add something like '1,3,7', I get all other points.