Friday, January 28, 2011

AutoCAD API error when adding text to a drawing Part 2

Well, the answer to yesterday's question was Test2. In order to avoid the layout locking problem (which I don't know why I had it in the first place), AutoCAD must load the form in memory. The downside to this is that I can no longer set my form to appear in the center of the AutoCAD session. I have to find a more elegant way that to move the form into position manually.

On to bigger problems for now...

Thursday, January 27, 2011

AutoCAD API error when adding text to a drawing

I have been working on a C# program that will ask the user for an insertion point and an angle before adding a simple DTEXT object to the drawing. I have encountered a problem that I have never seen before.

After the text was added to the drawing, in ModelSpace or PaperSpace, I could no longer change the active layout. The workaround was to do a REGEN and all returned to normal. I have spoken to Autodesk about this and it might be an issue with French versions of AutoCAD (I tested with 2008, 2009 and 2010 French).

To avoid the problem, the way I called my dialog box had to be changed. A command-line version of my program does not have the problem at all so it was probably related to the dialog box anyway. Here are the 3 different ways I can call my form:













Can you guess which one does work properly? I will post the answer tomorrow and will try it out on my English versions of AutoCAD for good measure as well.

Tuesday, January 04, 2011

AutoCAD performance problems on Windows 7 / Problèmes de performance avec AutoCAD sur Windows 7

A customer contacted me about a performance problem on 64-bit versions of AutoCAD running on Windows 7. The problems were related to dimensions and layers when the Properties or Layer Properties Manager was permanently docked. I spoke to Autodesk about this and here is their official recommendation:

Turn off Windows Aero themes and use the Windows 7 Basic theme instead.

It would seem that the Aero theme causes AutoCAD to refresh palette data too much for comfort.

Here is a screenshot of the theme to choose.



Un client m'a contacté concernant un problème de performance avec AutoCAD sur Windows 7 64-bit. Les problèmes étaient reliés aux dimensions et aux calques lorsque les palettes des Propriétés et le Gestionnaire des Propriétés des Calques étaient accrochées et toujours ouverts. J'ai parlé à Autodesk et voici leur recommandation officielle:

N'utilisez pas les thèmes Aero de Windows 7. Utilisez le thème Windows 7 Basic.

Il semblerait que la technologie Aero cause un rafraichissement des données dans AutoCAD beaucoup plus élevé causant des délais et des problèmes de performance.

Ci-dessus, il y a une image avec le choix du thème Basic.