Message 1 of 2
Not applicable
02-27-2016
04:05 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hi.
I'm working in Rvt2014, and i'm trying to get some parameter values from elements in linked models.
I can get the element, and read the parameter values, but for some reason I can't retrieve the values in some of them, (Mark, Comments, Type mark...) even when they exists...(instance and type parameters)
Here is my code for testing propose:
Public Sub t1()
Dim ref As Reference
Dim elem2 As Element
Dim elem As Element
Dim proyecto As String
Dim elem3 As Element
ref = ActiveUIDocument .Selection.PickObject(ObjectType.LinkedElement, "Seleccione tuberia, conducto o bandeja")
elem2 = ActiveUIDocument .Document .GetElement(ref.ElementId) 'documento que contiene el elemento
For Each docs As Document In Application.Documents 'busco el archivo linkeado
If docs.IsLinked Then
If InStr(elem2.Name, docs.Title) Then
elem = docs.GetElement(ref.LinkedElementId) 'ele elemento,
elem3=docs.GetElement (elem.GetTypeId )
proyecto = docs.Title
End If
End If
Next
Dim mensaje As String
Dim parametros As ParameterSet
parametros=elem.Parameters
For Each p As Parameter In parametros
mensaje=mensaje & p.Definition.Name & ": " & p.AsValueString & vbCr
Next
TaskDialog .Show ("INFO",mensaje)
End Sub
Can someone help me please?
Thankyou
Solved! Go to Solution.