<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Make User Parameters Visible in .NET Forum</title>
    <link>https://forums.autodesk.com/t5/net-forum/make-user-parameters-visible/m-p/2995880#M62588</link>
    <description>&lt;P&gt;My text didn't post, so as a 2nd attempt:&lt;/P&gt;&lt;P&gt;In the Object ARX Help guide.&amp;nbsp; I assumed that most of the commands were wrapped in vb.net, and I was right.&lt;/P&gt;&lt;P&gt;jvj&lt;/P&gt;</description>
    <pubDate>Tue, 19 Apr 2011 22:44:55 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2011-04-19T22:44:55Z</dc:date>
    <item>
      <title>Make User Parameters Visible</title>
      <link>https://forums.autodesk.com/t5/net-forum/make-user-parameters-visible/m-p/2860890#M62584</link>
      <description>&lt;P&gt;Moving right along with my Parametric Block programming tools.&amp;nbsp; I have successfully created several linked parameters with formulas and values, and now I want to be able to &lt;STRONG&gt;&lt;U&gt;&lt;EM&gt;show&lt;/EM&gt;&lt;/U&gt;&lt;/STRONG&gt; a select few of them in the Properties Palette&amp;nbsp;(NOT Parameters Manager) for the inserted block ref.&amp;nbsp; Taken from Stephen's example, here is my code for creating the AssocVariable (User Parameter)&lt;/P&gt;&lt;PRE&gt;    Public Function AddOrModifyVariable(ByVal varName As String, ByVal varExpression As String, ByVal sourceObjectID As ObjectId, ByVal trans As Transaction) As ObjectId
        Dim db As Database = sourceObjectID.Database
        Dim varId As ObjectId = ObjectId.Null
        Using trans2 As Transaction = trans.TransactionManager.StartTransaction()
            ' Open the AssocNetwork
            Dim networkId As ObjectId = AssocNetwork.GetInstanceFromObject(sourceObjectID, True, True, "")
            Dim network As AssocNetwork = DirectCast(trans2.GetObject(networkId, OpenMode.ForWrite), AssocNetwork)

            Dim var As AssocVariable = Nothing
            ' Iterate through all actions in the network
            Dim actionIds As ObjectIdCollection = network.GetActions
            For Each actionId As ObjectId In network.GetActions
                ' Is this action an AssocVariable?
                If actionId.ObjectClass.IsDerivedFrom(RXObject.GetClass(GetType(Autodesk.AutoCAD.DatabaseServices.AssocVariable))) Then
                    ' If so, we check if it has the name we're looking for.
                    var = DirectCast(trans2.GetObject(actionId, OpenMode.ForWrite), AssocVariable)
                    If var IsNot Nothing Then
                        ' If name matches, then we exit loop and set its expression
                        If var.Name = varName Then
                            Exit For
                        Else
                            var = Nothing
                        End If
                    End If
                End If
            Next
            ' If variable with correct name wasn't found, we create it.
            If var Is Nothing Then
                var = New AssocVariable()
                varId = network.Database.AddDBObject(var)
                network.AddAction(varId, True)
                trans2.AddNewlyCreatedDBObject(var, True)
                var.SetName(varName, True)
            End If
            ' Finally we set its expression to the new value.
            Dim errMsg As String = ""
            Try
                var.SetExpression(varExpression, "", True, True, errMsg, False)
                Dim rb As New ResultBuffer()
                errMsg = var.EvaluateExpression(rb)
                var.Value = rb
            Catch ex As Exception
                var.SetExpression(varExpression, "", False, False, errMsg, False)
            End Try
            trans2.Commit()
        End Using
        Return varId
    End Function&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;Looking into the idea, I don't know if I need to create a dynamic block property (or if that can be done), or somehow get this AssocVariable to display on its own.&amp;nbsp; Any Ideas?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;jvj&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;PS, I also noticed that the example for creating a parametric Dimension object, does not set the dimension to the right type of Dynamic dimension.&amp;nbsp; (Play with the Constraint From property in the properties palette, be sure to regen in between).&amp;nbsp; Any clue here...&lt;/P&gt;</description>
      <pubDate>Mon, 20 Dec 2010 21:11:06 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/make-user-parameters-visible/m-p/2860890#M62584</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2010-12-20T21:11:06Z</dc:date>
    </item>
    <item>
      <title>Re: Make User Parameters Visible</title>
      <link>https://forums.autodesk.com/t5/net-forum/make-user-parameters-visible/m-p/2870006#M62585</link>
      <description>&lt;P&gt;Does any body know how to make Parametric parameters assigned to a block reference visible in the properties palette with .net?&amp;nbsp; In the&amp;nbsp;Parameters window I right click on a property and select convert.&amp;nbsp; Then I can choose yes or no on the show column.&amp;nbsp; And that works manually, telling me there has to be a simple property, or object to modify.&amp;nbsp; Please help.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;jvj&lt;/P&gt;</description>
      <pubDate>Tue, 04 Jan 2011 16:14:22 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/make-user-parameters-visible/m-p/2870006#M62585</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2011-01-04T16:14:22Z</dc:date>
    </item>
    <item>
      <title>Re: Make User Parameters Visible</title>
      <link>https://forums.autodesk.com/t5/net-forum/make-user-parameters-visible/m-p/2995596#M62586</link>
      <description>&lt;P&gt;Where did you find information on using AssocNetwork?&lt;/P&gt;</description>
      <pubDate>Tue, 19 Apr 2011 19:36:33 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/make-user-parameters-visible/m-p/2995596#M62586</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2011-04-19T19:36:33Z</dc:date>
    </item>
    <item>
      <title>Re: Make User Parameters Visible</title>
      <link>https://forums.autodesk.com/t5/net-forum/make-user-parameters-visible/m-p/2995880#M62588</link>
      <description>&lt;P&gt;My text didn't post, so as a 2nd attempt:&lt;/P&gt;&lt;P&gt;In the Object ARX Help guide.&amp;nbsp; I assumed that most of the commands were wrapped in vb.net, and I was right.&lt;/P&gt;&lt;P&gt;jvj&lt;/P&gt;</description>
      <pubDate>Tue, 19 Apr 2011 22:44:55 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/make-user-parameters-visible/m-p/2995880#M62588</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2011-04-19T22:44:55Z</dc:date>
    </item>
  </channel>
</rss>

