<?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: Edit a Block via C# in .NET Forum</title>
    <link>https://forums.autodesk.com/t5/net-forum/edit-a-block-via-c/m-p/3366553#M56942</link>
    <description>&lt;P&gt;It should be generally able to edit these attributes:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;- Layer&lt;/P&gt;&lt;P&gt;- Insertionpoint&lt;/P&gt;&lt;P&gt;- Basepoint&lt;/P&gt;&lt;P&gt;- Rotation&lt;/P&gt;&lt;P&gt;- Scaling X&lt;/P&gt;&lt;P&gt;- Scaling Y&lt;/P&gt;&lt;P&gt;- Scaling Z&lt;/P&gt;&lt;P&gt;- Sampling fraction (Auswahlsatz in Englisch? &lt;span class="lia-unicode-emoji" title=":winking_face:"&gt;😉&lt;/span&gt; )&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;But this is the next problem, I see many attributes like kmh, beleuchtet, mast_id, etc. but non of those, I've mentioned.&lt;/P&gt;&lt;P&gt;How can i reach them?&lt;/P&gt;</description>
    <pubDate>Sun, 11 Mar 2012 12:06:47 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2012-03-11T12:06:47Z</dc:date>
    <item>
      <title>Edit a Block via C#</title>
      <link>https://forums.autodesk.com/t5/net-forum/edit-a-block-via-c/m-p/3366121#M56923</link>
      <description>&lt;P&gt;Hi community,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;my job is to make an editor for blocks in C#. There should be a WPF-window were the user can see a list of blocks. He selects one and than he should see an overview about block attributes like insertionpoint, basepoint, rotation and scaling and he should be able to edit these attributes in this form.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I know how i can populate a list of block names, but I fail at finding an opportunity to edit these attributes.&amp;nbsp;&lt;/P&gt;&lt;P&gt;I get the blocktablerecords, but then?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am very, very new to Autocad, and I've googled the last five hours unsuccessfully for a solution which is suitable for my problem.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Please help me, it is very urgent!&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Kind regards,&amp;nbsp;&lt;/P&gt;&lt;P&gt;Klaus&lt;/P&gt;</description>
      <pubDate>Sat, 10 Mar 2012 12:15:29 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/edit-a-block-via-c/m-p/3366121#M56923</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2012-03-10T12:15:29Z</dc:date>
    </item>
    <item>
      <title>Re: Edit a Block via C#</title>
      <link>https://forums.autodesk.com/t5/net-forum/edit-a-block-via-c/m-p/3366125#M56924</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&lt;FONT color="#666699"&gt;&amp;gt;&amp;gt; I get the blocktablerecords, but then?&lt;/FONT&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;Scan through the entities in the BlockTableRecord and find out which one is from type AttributeDefinition&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;- alfred -&lt;/P&gt;</description>
      <pubDate>Sat, 10 Mar 2012 12:19:18 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/edit-a-block-via-c/m-p/3366125#M56924</guid>
      <dc:creator>Alfred.NESWADBA</dc:creator>
      <dc:date>2012-03-10T12:19:18Z</dc:date>
    </item>
    <item>
      <title>Re: Edit a Block via C#</title>
      <link>https://forums.autodesk.com/t5/net-forum/edit-a-block-via-c/m-p/3366129#M56925</link>
      <description>&lt;P&gt;The only thing i've found with "AttributeDefinition" was&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier"&gt;blocktablerecord.HasAttributeDefinitions&lt;/FONT&gt;,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;but nothing with type "AttributeDefinition". Maybe I've missunderstood you?&lt;/P&gt;</description>
      <pubDate>Sat, 10 Mar 2012 12:26:53 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/edit-a-block-via-c/m-p/3366129#M56925</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2012-03-10T12:26:53Z</dc:date>
    </item>
    <item>
      <title>Re: Edit a Block via C#</title>
      <link>https://forums.autodesk.com/t5/net-forum/edit-a-block-via-c/m-p/3366135#M56926</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;go through each DBObject in the BlockTableRecord&lt;/P&gt;&lt;P&gt;verify if the current checked object is an AttributeDefintion, if it is one you have one (of may be more) AttributeDefinitions, take them for your handling you need to do with them.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;Dim tTrAct As DatabaseServices.Transaction = Nothing 'set your tTrAct
Dim tBlTabRec As DatabaseServices.BlockTableRecord = Nothing 'set your tBlTabRec

'now scan through the objects in the BTR
For Each tObjID As DatabaseServices.ObjectId In tBlTabRec
  If (tObjID.IsValid) AndAlso (Not tObjID.IsErased) AndAlso (tObjID.ObjectClass.DxfName.ToUpper = "ATTDEF") Then
    'ok object is valid and it's a AttributeDefinition
    Dim tAttDef As DatabaseServices.AttributeDefinition = CType(tTrAct.GetObject(tObjID, DatabaseServices.OpenMode.ForRead), DatabaseServices.AttributeDefinition)
    'here you have your access to the AttributeDefinition-object
  End If
Next&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;- alfred -&lt;/P&gt;</description>
      <pubDate>Sat, 10 Mar 2012 12:35:23 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/edit-a-block-via-c/m-p/3366135#M56926</guid>
      <dc:creator>Alfred.NESWADBA</dc:creator>
      <dc:date>2012-03-10T12:35:23Z</dc:date>
    </item>
    <item>
      <title>Re: Edit a Block via C#</title>
      <link>https://forums.autodesk.com/t5/net-forum/edit-a-block-via-c/m-p/3366137#M56927</link>
      <description>&lt;P&gt;Okay, i try to translate this in C# and i hope I am successful with that.&amp;nbsp;&lt;img id="smileywink" class="emoticon emoticon-smileywink" src="https://forums.autodesk.com/i/smilies/16x16_smiley-wink.png" alt="Smiley Wink" title="Smiley Wink" /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 10 Mar 2012 12:40:05 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/edit-a-block-via-c/m-p/3366137#M56927</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2012-03-10T12:40:05Z</dc:date>
    </item>
    <item>
      <title>Re: Edit a Block via C#</title>
      <link>https://forums.autodesk.com/t5/net-forum/edit-a-block-via-c/m-p/3366141#M56928</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&lt;FONT color="#666699"&gt;&amp;gt;&amp;gt; i try to translate&lt;/FONT&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;If you don't know it: that may help &lt;A href="http://www.developerfusion.com/tools/convert/csharp-to-vb/" target="_self"&gt;&amp;gt;&amp;gt;&amp;gt;translate c# vb&amp;lt;&amp;lt;&amp;lt;&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;- alfred -&lt;/P&gt;</description>
      <pubDate>Sat, 10 Mar 2012 12:54:34 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/edit-a-block-via-c/m-p/3366141#M56928</guid>
      <dc:creator>Alfred.NESWADBA</dc:creator>
      <dc:date>2012-03-10T12:54:34Z</dc:date>
    </item>
    <item>
      <title>Re: Edit a Block via C#</title>
      <link>https://forums.autodesk.com/t5/net-forum/edit-a-block-via-c/m-p/3366163#M56929</link>
      <description>&lt;P&gt;At&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;if ((tObjID.IsValid) &amp;amp;&amp;amp; (tObjID.IsErased == false) &amp;amp;&amp;amp; (tObjID.ObjectClass.DxfName.ToUpper = "ATTDEF"))
{
     AttributeDefinition tAttDef = (AttributeDefinition)tTrAct.GetObject(tObjID, OpenMode.ForRead);
}&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;I get an error:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Cannot assign to 'ToUpper' because it is a 'method group'.&lt;/P&gt;&lt;P&gt;Do you know a workaround?&lt;/P&gt;</description>
      <pubDate>Sat, 10 Mar 2012 13:30:05 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/edit-a-block-via-c/m-p/3366163#M56929</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2012-03-10T13:30:05Z</dc:date>
    </item>
    <item>
      <title>Re: Edit a Block via C#</title>
      <link>https://forums.autodesk.com/t5/net-forum/edit-a-block-via-c/m-p/3366169#M56930</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;you can erase the &lt;FONT color="#666699" face="lucida sans unicode,lucida sans"&gt;.ToUpper&lt;/FONT&gt; as it should not be necessary in that case, AutoCAD reports "ATTDEF" already in uppercase IMHO.&lt;/P&gt;&lt;P&gt;But I think you have to set double "=" in that statement for comparision in C#? So one equal-sign is missing and then&amp;nbsp;&lt;FONT color="#666699" face="lucida sans unicode,lucida sans"&gt;.ToUpper&lt;/FONT&gt; should work also!&lt;/P&gt;&lt;P&gt;&lt;FONT face="lucida sans unicode,lucida sans"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; tObjID.ObjectClass.DxfName.ToUpper =&lt;FONT color="#FF0000"&gt;=&lt;/FONT&gt; "ATTDEF"&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;- alfred -&lt;/P&gt;</description>
      <pubDate>Sat, 10 Mar 2012 13:42:58 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/edit-a-block-via-c/m-p/3366169#M56930</guid>
      <dc:creator>Alfred.NESWADBA</dc:creator>
      <dc:date>2012-03-10T13:42:58Z</dc:date>
    </item>
    <item>
      <title>Re: Edit a Block via C#</title>
      <link>https://forums.autodesk.com/t5/net-forum/edit-a-block-via-c/m-p/3366173#M56931</link>
      <description>&lt;P&gt;Yes, the second "=" helped, but it needed .ToUpper() to really work.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Okay I look how far i get with that and I will come back to this thread if I have any further problems.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you very much!&lt;/P&gt;</description>
      <pubDate>Sat, 10 Mar 2012 13:41:05 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/edit-a-block-via-c/m-p/3366173#M56931</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2012-03-10T13:41:05Z</dc:date>
    </item>
    <item>
      <title>Re: Edit a Block via C#</title>
      <link>https://forums.autodesk.com/t5/net-forum/edit-a-block-via-c/m-p/3366177#M56932</link>
      <description>&lt;P&gt;Further problems! &lt;span class="lia-unicode-emoji" title=":disappointed_face:"&gt;😞&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I've tried to print out some attributes but nothing happened... Now I've debugged this code:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;if ((tObjID.IsValid) &amp;amp;&amp;amp; (tObjID.IsErased == false) &amp;amp;&amp;amp; (tObjID.ObjectClass.DxfName.ToUpper() == "ATTDEF"))
{
     window.listBlockAttributes.Items.Add(tAttDef.Layer);
     window.listBlockAttributes.Items.Add(tAttDef.Rotation.ToString());
}&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;and i realized that something is wrong with the last if (tObjID.ObjectClass... and so on).&amp;nbsp;&lt;/P&gt;&lt;P&gt;The Code passes the first two ifs but never the third one.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Can you help me again? &lt;span class="lia-unicode-emoji" title=":winking_face:"&gt;😉&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The whole code of this method:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;[CommandMethod("loadbe")]
        public static void LoadBe()
        {
            Window1 window = new Window1();
            Document doc = Application.DocumentManager.MdiActiveDocument;
            Database db = doc.Database;
            
            Transaction tr = db.TransactionManager.StartTransaction();
            List&amp;lt;String&amp;gt; blocks = new List&amp;lt;string&amp;gt;();
            using (tr)
            {
                window.listBlockAttributes.Items.Add("bin im using");
                BlockTable bt = (BlockTable)tr.GetObject(db.BlockTableId, OpenMode.ForRead);
                foreach (ObjectId objId in bt)
                {
                    BlockTableRecord btr = (BlockTableRecord)tr.GetObject(objId, OpenMode.ForRead);

                    foreach (ObjectId tObjID in btr)
                    {

                        if ((tObjID.IsValid) &amp;amp;&amp;amp; (tObjID.IsErased == false) &amp;amp;&amp;amp; (tObjID.ObjectClass.DxfName.ToUpper() == "ATTDEF"))
                        {
                            AttributeDefinition tAttDef = (AttributeDefinition)tr.GetObject(tObjID, OpenMode.ForRead);
                            window.listBlockAttributes.Items.Add(tAttDef.Layer);
                            window.listBlockAttributes.Items.Add(tAttDef.Rotation.ToString());
                        }
                    }
                    window.listBlocks.Items.Add(btr.Name);
                }
            }
            Autodesk.AutoCAD.ApplicationServices.Application.ShowModelessWindow(window);
        }&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;Yeah, i know this code is not very useful, but i only wanted to know if there are any attributes which i can print out and I throw them in a list for now.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Kind Regards&lt;/P&gt;&lt;P&gt;Klaus&lt;/P&gt;</description>
      <pubDate>Sat, 10 Mar 2012 14:09:22 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/edit-a-block-via-c/m-p/3366177#M56932</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2012-03-10T14:09:22Z</dc:date>
    </item>
    <item>
      <title>Re: Edit a Block via C#</title>
      <link>https://forums.autodesk.com/t5/net-forum/edit-a-block-via-c/m-p/3366185#M56933</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&lt;FONT color="#666699"&gt;&amp;gt;&amp;gt; something is wrong with the last if (tObjID.ObjectClass... and so on).&amp;nbsp;&lt;/FONT&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&lt;FONT color="#666699"&gt;&amp;gt;&amp;gt; The Code passes the first two ifs but never the third one.&lt;/FONT&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;What AutoCAD-version do you have? And have you set LateBinding as allowed in your C#-project-settings?&lt;/P&gt;&lt;P&gt;The .DxfName did not exist from the beginning of AutoCAD &amp;amp; dotNET, it was added with AutoCAD 2010 I think (but I'm not sure about that, maybe a version earlier).&lt;/P&gt;&lt;P&gt;Anyway, if the property would not exist in your AutoCAD-version you should get an exception then ... do you see such when debugging?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&lt;FONT color="#666699"&gt;&amp;gt;&amp;gt; listBlockAttributes&lt;/FONT&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;What type is this variable?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;- alfred -&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;PS: "bin im using" deutet auf D oder A oder CH hin???&lt;/P&gt;</description>
      <pubDate>Sat, 10 Mar 2012 14:31:02 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/edit-a-block-via-c/m-p/3366185#M56933</guid>
      <dc:creator>Alfred.NESWADBA</dc:creator>
      <dc:date>2012-03-10T14:31:02Z</dc:date>
    </item>
    <item>
      <title>Re: Edit a Block via C#</title>
      <link>https://forums.autodesk.com/t5/net-forum/edit-a-block-via-c/m-p/3366191#M56934</link>
      <description>&lt;P&gt;Autocad-version 2012&lt;/P&gt;&lt;P&gt;Visual Studio 2010&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Latebinding doesn't mean anything to me.&amp;nbsp;&lt;img id="smileyindifferent" class="emoticon emoticon-smileyindifferent" src="https://forums.autodesk.com/i/smilies/16x16_smiley-indifferent.png" alt="Smiley Indifferent" title="Smiley Indifferent" /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;And at debugging, i get no exception(?).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;listBlockAttributes is a ListBox.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;PS: Österreich &lt;span class="lia-unicode-emoji" title=":winking_face:"&gt;😉&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Sat, 10 Mar 2012 14:39:47 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/edit-a-block-via-c/m-p/3366191#M56934</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2012-03-10T14:39:47Z</dc:date>
    </item>
    <item>
      <title>Re: Edit a Block via C#</title>
      <link>https://forums.autodesk.com/t5/net-forum/edit-a-block-via-c/m-p/3366211#M56935</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;without error-handling (and some checks like check for proxy, for xref, ...) this works with my drawings (having blocks with attributes) and AutoCAD 2010, 2011, 2012, 32bit and 64bit:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;        [Autodesk.AutoCAD.Runtime.CommandMethod("ADESK_ListBlockAttdefs")]
        public void ADESK_ListBlockAttdefs()
        {
            string ResultStr = "";

            Document tAcadDoc = Autodesk.AutoCAD.ApplicationServices.Application.DocumentManager.MdiActiveDocument;

            using (Transaction tTrAct = tAcadDoc.TransactionManager.StartTransaction())
            {
                BlockTable tBlTab = tTrAct.GetObject(tAcadDoc.Database.BlockTableId, OpenMode.ForRead) as BlockTable;
                IEnumerator tBlTabEnum = tBlTab.GetEnumerator();
                while (tBlTabEnum.MoveNext())
                {
                    BlockTableRecord tBlTabRec =tTrAct.GetObject((ObjectId) tBlTabEnum.Current ,OpenMode.ForRead) as BlockTableRecord;
                    IEnumerator tBlTabRecEnum = tBlTabRec.GetEnumerator();
                    while (tBlTabRecEnum.MoveNext())
                    {
                        ObjectId tObjID = (ObjectId)tBlTabRecEnum.Current;
                        if ((tObjID.IsValid == true) &amp;amp;&amp;amp; (tObjID.IsErased == false) &amp;amp;&amp;amp; (tObjID.ObjectClass.DxfName.ToUpper() == "ATTDEF"))
                        {
                            AttributeDefinition tAttDef = tTrAct.GetObject(tObjID,OpenMode.ForRead) as AttributeDefinition;
                            ResultStr += "Block: " + tBlTabRec.Name + "... Att: " + tAttDef.Tag +  "\n\r";
                        }
                    }
                }
            }
            //here you have the result of all your Blockdefinitions and their Attributedefinitions
        }&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;- alfred -&lt;/P&gt;</description>
      <pubDate>Sat, 10 Mar 2012 15:14:20 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/edit-a-block-via-c/m-p/3366211#M56935</guid>
      <dc:creator>Alfred.NESWADBA</dc:creator>
      <dc:date>2012-03-10T15:14:20Z</dc:date>
    </item>
    <item>
      <title>Re: Edit a Block via C#</title>
      <link>https://forums.autodesk.com/t5/net-forum/edit-a-block-via-c/m-p/3366535#M56936</link>
      <description>&lt;P&gt;Okay, i've tried your solutioin a bit, but the compiler isn't able to get in this third if:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;if(tObjID.ObjectClass.DxfName.ToUpper() == "ATTDEF")
{
    ...
}&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;The value of tObjID.ObjectClass.DxfName.ToUpper() is always something like "LINE", "LWPOLYLINE", etc. but never "ATTDEF".&amp;nbsp;&lt;/P&gt;&lt;P&gt;Hmmm, and now?&lt;/P&gt;</description>
      <pubDate>Sun, 11 Mar 2012 11:30:52 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/edit-a-block-via-c/m-p/3366535#M56936</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2012-03-11T11:30:52Z</dc:date>
    </item>
    <item>
      <title>Re: Edit a Block via C#</title>
      <link>https://forums.autodesk.com/t5/net-forum/edit-a-block-via-c/m-p/3366537#M56937</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;can you upload a drawing that you work on for testing the code?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;- alfred -&lt;/P&gt;</description>
      <pubDate>Sun, 11 Mar 2012 11:31:49 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/edit-a-block-via-c/m-p/3366537#M56937</guid>
      <dc:creator>Alfred.NESWADBA</dc:creator>
      <dc:date>2012-03-11T11:31:49Z</dc:date>
    </item>
    <item>
      <title>Re: Edit a Block via C#</title>
      <link>https://forums.autodesk.com/t5/net-forum/edit-a-block-via-c/m-p/3366539#M56938</link>
      <description>&lt;P&gt;Oh.. they are very simple! &lt;img id="smileylol" class="emoticon emoticon-smileylol" src="https://forums.autodesk.com/i/smilies/16x16_smiley-lol.png" alt="Smiley LOL" title="Smiley LOL" /&gt;&lt;/P&gt;</description>
      <pubDate>Sun, 11 Mar 2012 11:34:35 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/edit-a-block-via-c/m-p/3366539#M56938</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2012-03-11T11:34:35Z</dc:date>
    </item>
    <item>
      <title>Re: Edit a Block via C#</title>
      <link>https://forums.autodesk.com/t5/net-forum/edit-a-block-via-c/m-p/3366541#M56939</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;you don't have Attribtutes (not -definitions and no -references) in your drawing. So the scan will never find one as there are none. &lt;span class="lia-unicode-emoji" title=":winking_face:"&gt;😉&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Try my attachment, a traffic-sign with a lot of attributes.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;- alfred -&lt;/P&gt;</description>
      <pubDate>Sun, 11 Mar 2012 11:40:41 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/edit-a-block-via-c/m-p/3366541#M56939</guid>
      <dc:creator>Alfred.NESWADBA</dc:creator>
      <dc:date>2012-03-11T11:40:41Z</dc:date>
    </item>
    <item>
      <title>Re: Edit a Block via C#</title>
      <link>https://forums.autodesk.com/t5/net-forum/edit-a-block-via-c/m-p/3366545#M56940</link>
      <description>&lt;P&gt;Thanks for that, my Autocad-experiences belong to a 15min introduction. &lt;span class="lia-unicode-emoji" title=":winking_face:"&gt;😉&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Okay, I've tried it and now I see a lot more than 10 minutes ago! &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Next step: editting these attributes... We will see... &lt;span class="lia-unicode-emoji" title=":winking_face:"&gt;😉&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Sun, 11 Mar 2012 11:51:25 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/edit-a-block-via-c/m-p/3366545#M56940</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2012-03-11T11:51:25Z</dc:date>
    </item>
    <item>
      <title>Re: Edit a Block via C#</title>
      <link>https://forums.autodesk.com/t5/net-forum/edit-a-block-via-c/m-p/3366547#M56941</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&lt;FONT color="#666699"&gt;&amp;gt;&amp;gt; Next step: editting these attributes&lt;/FONT&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;Be careful, you should understand some AutoCAD-internals to be able to develop based on it.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;In this example you have to differenciate between AttributeDefinition and AttributeReference! If you want to modify the definition of the block, then you have to do this with &lt;FONT color="#666699" face="lucida sans unicode,lucida sans"&gt;BlockTableRecord&lt;/FONT&gt; and &lt;FONT color="#666699" face="lucida sans unicode,lucida sans"&gt;AttribtueDefinition&lt;/FONT&gt;, if you want to modify the speed-limit of my traffic-sign you have to use &lt;FONT color="#666699" face="lucida sans unicode,lucida sans"&gt;BlockReference&lt;/FONT&gt; and &lt;FONT color="#666699" face="lucida sans unicode,lucida sans"&gt;AttributeCollection&lt;/FONT&gt; and &lt;FONT color="#666699" face="lucida sans unicode,lucida sans"&gt;AttributeReference&lt;/FONT&gt;.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;The example-code above handles the definitions.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;- alfred -&lt;/P&gt;</description>
      <pubDate>Sun, 11 Mar 2012 11:59:16 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/edit-a-block-via-c/m-p/3366547#M56941</guid>
      <dc:creator>Alfred.NESWADBA</dc:creator>
      <dc:date>2012-03-11T11:59:16Z</dc:date>
    </item>
    <item>
      <title>Re: Edit a Block via C#</title>
      <link>https://forums.autodesk.com/t5/net-forum/edit-a-block-via-c/m-p/3366553#M56942</link>
      <description>&lt;P&gt;It should be generally able to edit these attributes:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;- Layer&lt;/P&gt;&lt;P&gt;- Insertionpoint&lt;/P&gt;&lt;P&gt;- Basepoint&lt;/P&gt;&lt;P&gt;- Rotation&lt;/P&gt;&lt;P&gt;- Scaling X&lt;/P&gt;&lt;P&gt;- Scaling Y&lt;/P&gt;&lt;P&gt;- Scaling Z&lt;/P&gt;&lt;P&gt;- Sampling fraction (Auswahlsatz in Englisch? &lt;span class="lia-unicode-emoji" title=":winking_face:"&gt;😉&lt;/span&gt; )&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;But this is the next problem, I see many attributes like kmh, beleuchtet, mast_id, etc. but non of those, I've mentioned.&lt;/P&gt;&lt;P&gt;How can i reach them?&lt;/P&gt;</description>
      <pubDate>Sun, 11 Mar 2012 12:06:47 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/edit-a-block-via-c/m-p/3366553#M56942</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2012-03-11T12:06:47Z</dc:date>
    </item>
  </channel>
</rss>

