.NET
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Visual Studio 2013 Preview and AutoCAD Blocks with Attributes

22 REPLIES 22
Reply
Message 1 of 23
klhill-anthc
4477 Views, 22 Replies

Visual Studio 2013 Preview and AutoCAD Blocks with Attributes

I am testing the Visual Studio 2013 Preview, and have found an interesting result.  I have an AutoCAD drawing that has a Block with Attributes in it.  I can open the drawing using AutoCAD 2014, Civil3D 2014, etc. and the block appears fine showing all the appropriate attributes.  However, if I launch AutoCAD or Civil3D 2014 using a project in Visual Studio 2013, then open the same drawing containing the Block with attributes, all of the attributes are invisible.  I can see linework in the block, but the attributes don't show in the drawing editor.  If I select the linework of the block, and look at it's properties, the attributes are there and the values are correct.  The only difference is that I launched Autocad from inside Visual Studio instead of just opening the drawing directly without Visual Studio.

 

Interestingly, I can launch AutoCAD 2014 and open the drawing with no problem if I use Visual Studio 2010.

 

I have attached a sample of the drawing containing the block with attributes.

 

Is anyone else having that problem?

22 REPLIES 22
Message 2 of 23

I have experienced a similar (or the same) problem, using Visual Studio Express 2010 with AutoCAD and AutoCAD Electrical 2012. A number of attributes aren't availble from the Enhanced Attribute Editor. Attached is a picture of the Editor.

 

Interestingly (and the reason I haven't pursued the issue), the attributes are still embedded within the block. I can get them and set them with C# without a problem.

Message 3 of 23

Sorry for double posting, the 'edit' option wasn't available on my post for some reason... To be clear, this particular block has four attributes defined, but only one of them appear to be available in the editor.
Message 4 of 23
klhill-anthc
in reply to: klhill-anthc

In my case, I don't even have to netload the project that launched Autocad to begin with, so it doesn't matter if the project is C# or VB.net.  It's just the act of launching Autocad from within Visual Studio 2013 that causes it.

Message 5 of 23
hgasty1001
in reply to: klhill-anthc

Hi,

 

Check FIBERWORLD system variable, when 0 some "funny" things happens in AutoCAD. (change its value with NEXTFIBERWORLD=1).

 

Gaston Nunez

Message 6 of 23
klhill-anthc
in reply to: hgasty1001

Thanks for the suggestion.  However, my nextfiberworld was already set to 1.  Just for my own curiosity, I tried setting it to zero, but then AutoCAD wouldn't even launch completely.  It stopped in a state that the only way I could even close it was to end the process from within Task Manager.  Thanks anyway.

Message 7 of 23
Danny.isr
in reply to: klhill-anthc

I have a similar problem found a solution

Message 8 of 23
tleaxavia
in reply to: klhill-anthc

Same problem here for PLANT3d and the final version of Visual Studio 2013. After starting a debug session for a x64 installation with managed debugging activated no attributes are visible.

 

Now we would have edit and continue for x64 environments (new feature for VS2013 and the new CLR 4.0) but now e could not see our atributes. 

 

FIBERWORLD is off....

 

Please provide a fix for this. It is realy importend....

 

Steps to for the problem:

 

1. Create a dummy C# project within VS2013 on a x64 system

2. Open seetings and configure the debug location to "acad.exe" 

3. Activate manage debugging only (is deault)

4. press F5 and start debugging.... 

5. no attributes are visible wihin plant 3d (ex.: labels for pipelines in PID)

Message 9 of 23
samirbittar
in reply to: klhill-anthc

I'm also having issues when debugging AutoCAD 2013 with VS2013 (with the .NET API). I haven't tested with blocks and their attributes, but I have tested creating text styles from the .NET API, and they're not working.

 

If I debug the code that creates the text styles with VS2013, the code runs to the end, but when I try to load the text style by using the "Manage text styles..." dialog, AutoCAD 2013 crashes!!!

 

However, if I debug the exact same code (same project) from VS2012, then no problems happen, the text style is created correctly and everything works well!

 

I'm even attaching a sample project in here for those that want to test this behavior.

 

Hope this is fixed soon!

Message 10 of 23
ow
Contributor
in reply to: klhill-anthc

I've got the same issue here with .NET debugging from VS2013. Also MText objects are invisible and the textstyles-dialog crashes AutoCAD.

 

it works well with C++ debugging though. 

 

Message 11 of 23
tleaxavia
in reply to: klhill-anthc

Hello,

 

Ok... the problem is even greater than I have thought....

 

Currently it is not possible to debug managed code (no mixed code debugging, no attach to process) with Visual Studio 2013 for at least ACAD 2014 and ACAD2013 on x86 and x64 environments.

 

While debugging something happens in the area of the text style management. So we have no text graphics visible on the drawing area (including attriubtes, labels for PLANT 3d, ....).....

 

Please help!

Message 12 of 23

Having same issue here. (AutoCAD 2014)

 

Just wanted to add that I've noticed ** Undefined shape XXX entries on my command line when trying to add MText to the drawing or when clicking on exiting objects.

Message 13 of 23
tleaxavia
in reply to: klhill-anthc

Message 14 of 23
Balaji_Ram
in reply to: ow

Hi,

 

My colleagues have enquired about this with our engineering team.

 

I will update you based on that discussion.

 

Regards,

 



Balaji
Developer Technical Services
Autodesk Developer Network

Message 15 of 23
gupta.varun
in reply to: ow

Hello, I am from Microsoft .NET Framework team. We saw this thread, but we are unable to reproduce this error in-house on various machines. We could be missing some key step. We would appreciate if you someone can contact us on netfx45compat at microsoft com with step by step instructions to reproduce the problem (OS, Processor arch etc would be useful as well).

 

Sincerely,

Varun Gupta

.NET Framework Compatibility

Message 16 of 23
tleaxavia
in reply to: gupta.varun

Hello Varun Gupta,

 

Thanks for analysing this problem!

 

Mybe that all this problems are releated with the German version of AutoCAD, VisualStudio or the OS. I am using:

 

WIN7, WIN8 and WIN 8.1 (so it should not be related with a specific OS version), VS 2013 released version, AutoCAD 2014 SP1 (but it is also not working for 2013, 2012, 2011 and 2010) all in German (DE-AT) (OS, VS and AutoCAD)!

 

Here are my steps:

 

Try the following from VS2013 release:

1. create a C# project and configure acad.exe as debugger target.
2. (do not activete native code debugging -> no mixed code debugging, managed only!)
3. hit F5
4. Acad does not show text attributes on the drawing area.

I hope this helps!

Message 17 of 23
samirbittar
in reply to: gupta.varun

Hello, Varun Gupta.

 

Just as an addition to tleaxavia's post, this problem is happening with me as well, however, I'm using Windows 7 64-bit pt-BR language, AutoCAD 2013 64-bit english and VS 2013 Professional, also in english.

 

The steps to reproduce are as simple as tleaxavia mentioned, but I just want to add a few more explanations as to how you can reproduce the bug:

  1. Create a .NET 4.0 C# class library project, setting "Project Properties --> Debug --> Start external program" to your 64-bit executable of AutoCAD 2013/2014 (acad.exe). I confirmed that you do not even need to reference AutoCAD's dlls in this C# project for the bug to be reproduced.
  2. Run your project (F5) so that AutoCAD will load up.
  3. When AutoCAD finishes loading up and opens up the new blank document, just type the "STYLE" command. This command should open a dialog for you to select text styles. (Please note that this is one of autocad's native commands, that is, no custom code will be executed)
  4. As soon as AutoCAD tries to load this text styles dialog, it will crash.

That's it, no custom code required, just the fact that AutoCAD is being debugged with VS 2013 is causing this problem.

 

I added a few screenshots just to illustrate the steps.

 

Thank you,

Samir

Message 18 of 23
tleaxavia
in reply to: samirbittar

Hello samirbittar,

 

Thanks for the additional reproduction steps. This is exactly our problem.

 

And many thanks for letting me know, that the problem also appear at an English installation. So I could stop setting up a virtual image with English settings for testing....

 

Thanks,

 

Thomas. 

Message 19 of 23
tleaxavia
in reply to: tleaxavia

Ok,

 

I have done a clean room setup of WIN 7 SP1 (EN-US), VS 2013 (EN) and ACAD 2014 (EN). Problem is does not disappear!

 

-> it is definitly not a language dependent problem.

 

I hope this helps.

 

Thomas.

Message 20 of 23
Balaji_Ram
in reply to: klhill-anthc

Hi,

 

I have logged this behavior for our engineering team to analyze.

 

The other behavior with the text style dialog has already been logged with our engineering team by my colleague.

 

Regards,

 

 

 



Balaji
Developer Technical Services
Autodesk Developer Network

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk DevCon in Munich May 28-29th


Autodesk Design & Make Report

”Boost