+ Reply to Thread
Results 1 to 2 of 2
  1. #1
    Super Member Commandobill's Avatar
    Using
    AutoCAD 2014
    Join Date
    Oct 2008
    Location
    Raleigh, NC
    Posts
    538

    Default Update Custom Property Value

    Registered forum members do not see this ad.

    I have searched quite a bit for this with no avail. I am trying to update the value of pre-existing custom properties in a drawing using .net. I can get the current value with ease, but updating it has become difficult.

    Any help?
    ***Commandobill***
    Abusing AutoCad Since 1999
    "Caddatude... Do you has it?"
    Sorry for my poor English, I'm American...

  2. #2
    Super Member Commandobill's Avatar
    Using
    AutoCAD 2014
    Join Date
    Oct 2008
    Location
    Raleigh, NC
    Posts
    538

    Default

    Registered forum members do not see this ad.

    Never mind I figured it out
    Code:
        Sub PutAcadCustomeProps(ByVal custPropName As String, ByVal custPropVal As String)
    
            Dim DB As Database = Application.DocumentManager.MdiActiveDocument.Database
            Dim objSumBuilder As DatabaseSummaryInfoBuilder = New DatabaseSummaryInfoBuilder(DB.SummaryInfo)
            Dim custProps As IDictionary = objSumBuilder.CustomPropertyTable
    
    
    
            If custProps.Contains(custPropName) Then
                objSumBuilder.CustomPropertyTable.Item(custPropName) = custPropVal
                DB.SummaryInfo = objSumBuilder.ToDatabaseSummaryInfo()
            End If
    
    
    
    
        End Sub
    ***Commandobill***
    Abusing AutoCad Since 1999
    "Caddatude... Do you has it?"
    Sorry for my poor English, I'm American...

Similar Threads

  1. Custom property of block
    By satishrajdev in forum AutoLISP, Visual LISP & DCL
    Replies: 5
    Last Post: 23rd Mar 2015, 05:04 pm
  2. Auto Ballon Custom Property
    By danielk in forum Autodesk Inventor
    Replies: 0
    Last Post: 10th Dec 2014, 02:41 pm
  3. How do I set a custom property in a dynamic block?
    By AaronHolmes in forum AutoLISP, Visual LISP & DCL
    Replies: 9
    Last Post: 16th May 2012, 10:37 am
  4. Replies: 20
    Last Post: 18th May 2011, 10:32 pm
  5. Error when adding custom drawing property
    By lfe011969 in forum AutoLISP, Visual LISP & DCL
    Replies: 5
    Last Post: 14th Jan 2011, 07:20 pm

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts