Slope

Slope

reylorente1
Collaborator Collaborator
724 Views
4 Replies
Message 1 of 5

Slope

reylorente1
Collaborator
Collaborator
How to extract these values, which are displayed, when the pipe is clicked?
Here you are the imageSon estos valores en azulesSon estos valores en azules

.......

 

//Seleccionamos un elemento:
Reference referencia = uidoc.Selection.PickObject(ObjectType. Element);

 

//Obtenemos el elemento de la referencia:
Element elem = doc.GetElement(referencia);

 

Pipe pipe = (Pipe)elem;

 

string param_Start_Slope = pipe.get_Parameter(BuiltInParameter....???

 

........

 

 

 

0 Likes
Accepted solutions (1)
725 Views
4 Replies
Replies (4)
Message 2 of 5

naveen.kumar.t
Autodesk Support
Autodesk Support

Hi @reylorente1 ,

The parameters which you are trying to access are instance parameters.

There are different ways to access instance parameters.

Method 1:

Element e;
foreach (Parameter p in e.Parameters)
            {
                //Here [e.parameters] contains all the instance parameters
               if(p.Definition.Name.Contains("Slope")||p.Definition.Name.Contains("slope"))
               {
                    string parameterName = p.Definition.Name;
                    string parameterValue = p.AsValueString();
               }
            } 

Method 2:

Element e;
Parameter slopeParam = e.get_Parameter(BuiltInParameter.RBS_PIPE_SLOPE);
if(slopeParam!=null)
  {
    string slopeValue = slopeParam.AsValueString();
  }

I hope this helps.


Naveen Kumar T
Developer Technical Services
Autodesk Developer Network

0 Likes
Message 3 of 5

reylorente1
Collaborator
Collaborator
Thanks, but that's not what I'm looking for, if you notice, when I show the labels there are two values, Start Offset = null, which is the one connected to the plumbing fixture and End Offset the other is the height with respect to the level.
 I was looking through the BuiltInParameter.
 List and found these
1-BuiltInParameter.SLOPE_START_HEIGHT
2-BuiltInParameter.SLOPE_END_HEIGHT, but it doesn't work.

Aquí esta en español
Gracias, pero eso no es lo que busco, si te fijas, cuando muestro la etiquetas hay dos valores, Start Offset = cero, que es el esta conectado al mueble sanitario y el otro END Offset =es la altura con respeto al nivel
.Estuve buscando en la lista de BuiltInParameter... y encontré estos
1-BuiltInParameter.SLOPE_START_HEIGHT
2-BuiltInParameter.SLOPE_END_HEIGHT,pero no trabaja
0 Likes
Message 4 of 5

reylorente1
Collaborator
Collaborator
Thanks, but that's not what I'm looking for, if you notice, when I show the labels there are two values, Start Offset = null, which is the one connected to the plumbing fixture and End Offset the other is the height with respect to the level.
 I was looking through the BuiltInParameter.
 List and found these
1-BuiltInParameter.SLOPE_START_HEIGHT
2-BuiltInParameter.SLOPE_END_HEIGHT, but it doesn't work.

Aquí esta en español
Gracias, pero eso no es lo que busco, si te fijas, cuando muestro la etiquetas hay dos valores, Start Offset = cero, que es el esta conectado al mueble sanitario y el otro END Offset =es la altura con respeto al nivel
.Estuve buscando en la lista de BuiltInParameter... y encontré estos
1-BuiltInParameter.SLOPE_START_HEIGHT
2-BuiltInParameter.SLOPE_END_HEIGHT,pero no trabaja
0 Likes
Message 5 of 5

RPTHOMAS108
Mentor
Mentor
Accepted solution

Use RevitLookup to find the correct parameter on the instance. That will indicate the BuiltInParameter to use if applicable.

 

You'll not easily find from the enum itself.

0 Likes