Community
Civil 3D Customization
Welcome to Autodesk’s AutoCAD Civil 3D Forums. Share your knowledge, ask questions, and explore popular AutoCAD Civil 3D Customization topics.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

point number ranks.

3 REPLIES 3
SOLVED
Reply
Message 1 of 4
joantopo
434 Views, 3 Replies

point number ranks.

joantopo
Mentor
Mentor

I have a method to create new point group.

 

In this method I add as parameter one vector which contains point numbers.

 

   string Numeros_Incluidos = "";
                        //buscamos todos los number point según su id y creamos una cadena string
                        foreach (uint NP in listaNumberPoints)
                        {
                            Numeros_Incluidos = Numeros_Incluidos + Convert.ToString(NP) + ",";

                        }

                        standardPointGrpQry.IncludeNumbers = Numeros_Incluidos;  //ejemplo: "550-560, 565-572"


                        //This method sets the query object in the point group
                        pointGrp.SetQuery(standardPointGrpQry);

 I create  a string called "Numeros_incluidos" that it is a chain of all numbers.

e.g:

"1,2,3,4,5,9,10,11,15,18,21,22,"

 

However I would like to create one function to create this string more organized as:

"1-5,9-11,15,18,21-22".

 

Any ideas?

 

Autocad C3D 2019 SP3, 2020 & 2021
Intel I9 9900K with frontal watercooler alphacool eisbaer 360 (original fans mounted in pull)- 3 fans Corsair 120 ML PRO in push.
MOBO Gygabyte Z390 Aorus Master- Corsair RGB Vengeance 64GB RAM (4x16) CL16
Nvidia Quadro RTX 4000
Samsung 970 EVO PLUS 1TB (unit C). Samsung 970 PRO 512GB (for data)
Power Supply: Corsair TX850M PLUS


Descubre mi programa VisorNET para Civil 3D:
https://apps.autodesk.com/CIV3D/es/Detail/Index?id=appstore.exchange.autodesk.com%3avisornet_windows32and64%3aes
0 Likes

point number ranks.

I have a method to create new point group.

 

In this method I add as parameter one vector which contains point numbers.

 

   string Numeros_Incluidos = "";
                        //buscamos todos los number point según su id y creamos una cadena string
                        foreach (uint NP in listaNumberPoints)
                        {
                            Numeros_Incluidos = Numeros_Incluidos + Convert.ToString(NP) + ",";

                        }

                        standardPointGrpQry.IncludeNumbers = Numeros_Incluidos;  //ejemplo: "550-560, 565-572"


                        //This method sets the query object in the point group
                        pointGrp.SetQuery(standardPointGrpQry);

 I create  a string called "Numeros_incluidos" that it is a chain of all numbers.

e.g:

"1,2,3,4,5,9,10,11,15,18,21,22,"

 

However I would like to create one function to create this string more organized as:

"1-5,9-11,15,18,21-22".

 

Any ideas?

 

Autocad C3D 2019 SP3, 2020 & 2021
Intel I9 9900K with frontal watercooler alphacool eisbaer 360 (original fans mounted in pull)- 3 fans Corsair 120 ML PRO in push.
MOBO Gygabyte Z390 Aorus Master- Corsair RGB Vengeance 64GB RAM (4x16) CL16
Nvidia Quadro RTX 4000
Samsung 970 EVO PLUS 1TB (unit C). Samsung 970 PRO 512GB (for data)
Power Supply: Corsair TX850M PLUS


Descubre mi programa VisorNET para Civil 3D:
https://apps.autodesk.com/CIV3D/es/Detail/Index?id=appstore.exchange.autodesk.com%3avisornet_windows32and64%3aes
3 REPLIES 3
Message 2 of 4
Jeff_M
in reply to: joantopo

Jeff_M
Consultant
Consultant
Accepted solution

You can see what we use for the SincpacC3D in the free edition source code we've posted. Look in the PointListCreator.cs file.

 

Jeff_M, also a frequent Swamper
EESignature
0 Likes

You can see what we use for the SincpacC3D in the free edition source code we've posted. Look in the PointListCreator.cs file.

 

Jeff_M, also a frequent Swamper
EESignature
Message 3 of 4
joantopo
in reply to: Jeff_M

joantopo
Mentor
Mentor

It´s right. 

 

However,I think that all  methods in class(PointListCreator) should be in uint Type  instead of int(integer) because Civil 3D methods as "GetPointnumbers" returns a uint[] or "GetPointByPointNumber(uint value) use uint value.

 

Autocad C3D 2019 SP3, 2020 & 2021
Intel I9 9900K with frontal watercooler alphacool eisbaer 360 (original fans mounted in pull)- 3 fans Corsair 120 ML PRO in push.
MOBO Gygabyte Z390 Aorus Master- Corsair RGB Vengeance 64GB RAM (4x16) CL16
Nvidia Quadro RTX 4000
Samsung 970 EVO PLUS 1TB (unit C). Samsung 970 PRO 512GB (for data)
Power Supply: Corsair TX850M PLUS


Descubre mi programa VisorNET para Civil 3D:
https://apps.autodesk.com/CIV3D/es/Detail/Index?id=appstore.exchange.autodesk.com%3avisornet_windows32and64%3aes
0 Likes

It´s right. 

 

However,I think that all  methods in class(PointListCreator) should be in uint Type  instead of int(integer) because Civil 3D methods as "GetPointnumbers" returns a uint[] or "GetPointByPointNumber(uint value) use uint value.

 

Autocad C3D 2019 SP3, 2020 & 2021
Intel I9 9900K with frontal watercooler alphacool eisbaer 360 (original fans mounted in pull)- 3 fans Corsair 120 ML PRO in push.
MOBO Gygabyte Z390 Aorus Master- Corsair RGB Vengeance 64GB RAM (4x16) CL16
Nvidia Quadro RTX 4000
Samsung 970 EVO PLUS 1TB (unit C). Samsung 970 PRO 512GB (for data)
Power Supply: Corsair TX850M PLUS


Descubre mi programa VisorNET para Civil 3D:
https://apps.autodesk.com/CIV3D/es/Detail/Index?id=appstore.exchange.autodesk.com%3avisornet_windows32and64%3aes
Message 4 of 4
Jeff_M
in reply to: joantopo

Jeff_M
Consultant
Consultant

@joantopo wrote:

It´s right. 

 

However,I think that all  methods in class(PointListCreator) should be in uint Type  instead of int(integer) because Civil 3D methods as "GetPointnumbers" returns a uint[] or "GetPointByPointNumber(uint value) use uint value.

 


I agree. That code was originally written for C3D2007 which used only the COM objects. The COM Database AeccPoint object returns the Number as an int so most everything in that FreeEdition code is based on that. As we've moved to a fully .NET managed package I've been updating all of the extensions accordingly.

Jeff_M, also a frequent Swamper
EESignature
0 Likes


@joantopo wrote:

It´s right. 

 

However,I think that all  methods in class(PointListCreator) should be in uint Type  instead of int(integer) because Civil 3D methods as "GetPointnumbers" returns a uint[] or "GetPointByPointNumber(uint value) use uint value.

 


I agree. That code was originally written for C3D2007 which used only the COM objects. The COM Database AeccPoint object returns the Number as an int so most everything in that FreeEdition code is based on that. As we've moved to a fully .NET managed package I've been updating all of the extensions accordingly.

Jeff_M, also a frequent Swamper
EESignature

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Rail Community


Autodesk Design & Make Report