Posts: 17
Registered: ‎03-15-2008
Message 11 of 11 (70 Views)

Re: Help! with this code to insert one block with 3 attributes...

05-13-2013 10:09 PM in reply to: luisibad

Sorry! I forgot this line


Hi! I did it... this is the code....


Dim Count As Int16 = 0 'I've added this line


For Each attId As ObjectId In Btr

   Dim ent As Entity = DirectCast(tr.GetObject(attId, OpenMode.ForRead), Entity)

        If TypeOf ent is AttributeDefinition Then

     Dim attDef AsAttributeDefinition = DirectCast(ent, AttributeDefinition)

          Dim attRef AsNewAttributeReference()


          attRef.SetAttributeFromBlock(attDef, BRef.BlockTransform)




             If listTags.Contains(attDef.Tag) Then

                        AttRef.TextString = ListValues(Count)


             End If

             Count = Count + 1

      End If




Again Hallex thanks for your help! I hope to count on your help if I'll have more questions....


You are not logged in.

Log into access your profile, ask and answer questions, share ideas and more. Haven't signed up yet? Register

Are you familiar with the Autodesk Expert Elites? The Expert Elite program is made up of customers that help other customers by sharing knowledge and exemplifying an engaging style of collaboration. To learn more, please visit our Expert Elite website.

Need installation help?

Start with some of our most frequented solutions to get help installing your software.

Ask the Community