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?
Solved! Go to Solution.
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?
Solved! Go to Solution.
Solved by Jeff_M. Go to 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.
You can see what we use for the SincpacC3D in the free edition source code we've posted. Look in the PointListCreator.cs file.
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.
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.
@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.
@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.
Can't find what you're looking for? Ask the community or share your knowledge.