First steps with AutoCAD 2017 and VS2015

First steps with AutoCAD 2017 and VS2015

Anonymous
Not applicable
9,653 Views
58 Replies
Message 1 of 59

First steps with AutoCAD 2017 and VS2015

Anonymous
Not applicable

I'm making my first steps porting our application to AutoCAD2017 and VS2015.

 

I immediately found a weird behaviour: AutoCAD 2017 run from inside Visual Studio (just execuded acad.exe without netloading anything) starts without ribbon and the command _ribbon is unknown....

 

If I run AutoCAD 2017 outside Visual Studio everything is normal...

Also, no problems running AutoCAD 2015 inside Visual Studio.

 

My environment is Windows 8.1 64bit, Visual Studio 2015, AutoCAD 2017 64bit.

 

Any idea?

0 Likes
Accepted solutions (1)
9,654 Views
58 Replies
Replies (58)
Message 21 of 59

Anonymous
Not applicable

... and the latter post about newly released AutoCAD2015: http://through-the-interface.typepad.com/through_the_interface/2014/03/autocad-2015-for-developers.h...

 

From where I quote:  

 

'On the subject of debugging, we've fixed the issue related to edit & continue of 64-bit .NET applications in Visual Studio 2013. This is great news for .NET developers.'

 

So, indeed is something resurfaced... can Autodesk say something official about this? I'd like to know if this is something that can be fixed again or if this time is something you can't fix.

 

Edit&Continue may seem a commodity for people that learned to debug with printf(), like me, but nowadays is something I cannot do without, it takes too much to restart a project and reach the troubled point, sometime hours... I'd rather reinstall a 32bit OS from scratch!!

 

Thank you!

0 Likes
Message 22 of 59

Jeff_M
Consultant
Consultant

@Anonymous, I believe that @ambrosl DID say something official and that they are working on it. I'm sure they will figure it out and get it corrected. In the meantime, can you do most of your debugging using Acad2016 where E&C does work? There are not that many new things in 2017, so this approach is working for me at this time.

Jeff_M, also a frequent Swamper
EESignature
0 Likes
Message 23 of 59

Anonymous
Not applicable

For us and for our vertical application may become a problem, I mean, develope and test on VS2013/ACAD2016 and recompile and re-test under VS2015/ACAD2017... this will almost double the time to deliver... and we work on a very tight schedule...

 

I think I'll advice my company and our customers to postpone any upgrade until further notice... not a big deal after all, recently the improvements on AutoCAD have been very few and I have customers that usually upgrade one release every two or three...

0 Likes
Message 24 of 59

kerry_w_brown
Advisor
Advisor

@Jeff_M wrote:

< .. >  In the meantime, can you do most of your debugging using Acad2016 where E&C does work? There are not that many new things in 2017, so this approach is working for me at this time.


 

Hi Jeff , which editor are you using ?

I've not been able to use E&C with VS2015 and AC2016.

 

 


// Called Kerry or kdub in my other life.

Everything will work just as you expect it to, unless your expectations are incorrect. ~ kdub
Sometimes the question is more important than the answer. ~ kdub

NZST UTC+12 : class keyThumper<T> : Lazy<T>;      another  Swamper
0 Likes
Message 25 of 59

Jeff_M
Consultant
Consultant

Kerry, I can E&C Acad2016 in both VS2013 & VS2015. Make sure that the options enabled in order to Debug (not E&C) 2017 are disabled to use with 2016.

Jeff_M, also a frequent Swamper
EESignature
0 Likes
Message 26 of 59

Anonymous
Not applicable
@_Tharwat
Have you found a workaround? Of course I have the same problem...
It seems it doesn't recognize the CommandClass() directive...
The other code (like class Initialize() or event handlers) run correctly, you can even debug it and use Edit&Continue.
I'm talking of using VS2015 and ACAD2017.
But unlike you, if I set the Debug Compatibility Mode On, the commands are recognized. I just loose the E&C.

So far, for .NET only projects we can still use VS2013 and ACAD2016 for development and debug, then use the same DLL in AutoCAD 2017.
Otherwise, you can use:
- VS2013 + ACAD2017: no ribbon, E&C works
- VS2013 + ACAD2017 + Debug Compat Mode On: ribbon ok, E&C doesn't work
- VS2015 + ACAD2017: no ribbon, no commands recognized
- VS2015 + ACAD2017 + Debug Compat Mode On: ribbon ok, commands ok, E&C doesn't work

For Mixed language projects I believe you are forced to use VS2015 to compile the C++ DLLs. But here, I'm not able yet to make it work. Even in compatibility mode the DLL is not netloaded or executed, but I get no error messages from ACAD2017...

My mixed language project is derived from the old OPM extension project (Object Properties Manager Extension) originally published on Kean's blog and latter ported to ACAD2016 by Cyrille Fauvel (see https://github.com/cyrillef/OPMNetExt )

Anyone tried something like that? Any workaround?
0 Likes
Message 27 of 59

_Tharwat
Advisor
Advisor

No solution nor workaround found either.

0 Likes
Message 28 of 59

CADbloke
Advocate
Advocate

@Anonymous wrote:

Edit&Continue may seem a commodity for people that learned to debug with printf(), like me, but nowadays is something I cannot do without, it takes too much to restart a project and reach the troubled point, sometime hours... I'd rather reinstall a 32bit OS from scratch!!

 


This is where Log.Verbose() is your friend. I use Serilog + Seq for a real-time log output in the browser. It's a whole lot quicker than waiting for a bazillion .pdb files to attach themselves to a debugger, Ctrl-F5 gets things crashing really quickly.

 

Just put a Log.Verbose where you'd put a break point and log what you wanted to see. You can log the same information to a rolling text file or wherever you like.

 

Here's a sample of what I mean...

 

var littleTicker = new Stopwatch();
littleTicker.Start();
....

Log.Verbose("{count} Equipments added by user {user}.\n {equipment}",
                                    equipmentAddedForLog.Count,
                                    lastSavedUser,
                                    equipmentAddedForLog);
.....


Log.Verbose("Before Thing that takes a long time: {timer}. ", littleTicker.Elapsed.ToString(@"ss\.fffff"));

... Thing that takes a long time ...

Log.Verbose("End of Thing that takes a long time: {timer}. ", littleTicker.Elapsed.ToString(@"ss\.fffff"));

 

- - - - - - -
working on all sorts of things including www.tvCAD.tv & www.CADreplace.com
Message 29 of 59

Anonymous
Not applicable
Hi CADbloke,
just for the sake of a little chat...
To me the problem is not to use logs or debug.print or whatever other method to understand a problem... also because you can still use the debugger with all its whistles.
The real advantage with Edit&Continue is that you can fix/improve your code and don't have to restart the project. That's the real time gain. With a single run you can fix many bugs, and also develop 'on the run' with real data.
Without E&C you may need multiple runs and if the project need an hour to reach the troubled point... you gonna loose days pretty fast! 😉

Like I said, I did it for years and if I have to I can live without E&C, but to me is a big loss for big and small projects, and it may be worth to rebuild a 32bit development machine just for that... (haven't tried, but I give for granted that on 32bit OS there is no such problems, like in the past).

Just hope it won't require to wait another product release to see this fixed...
Message 30 of 59

CADbloke
Advocate
Advocate

@Anonymous wrote:
The real advantage with Edit&Continue is that you can fix/improve your code and don't have to restart the project. That's the real time gain. With a single run you can fix many bugs, and also develop 'on the run' with real data.
Without E&C you may need multiple runs and if the project need an hour to reach the troubled point... you gonna loose days pretty fast! 😉


Yup, I totally agree. 

 

This is around the time you get the clever-clogs chiming in about unit-testing and modularising things into smaller testable parts. Well, yay for them. Sure, I do it when I can (that's why I wrote CADtest) but you have a workflow that works really well for you and "they" shouldn't be breaking that. I love the debugger, watches and auto-watch, breakpoints and all that too and I use it often. I haven't used Edit & Continue much at all (I probably couldn't get it to work when I tried) so I usually use the debugger startup time to go check if the kids are still sleeping.

 

Virtualbox 5.0.12 is working wonderfully well for me (host on Windows 10,, guests on Windows 7) running AutoCAD 2007 to present in x64 and x86. I highly recommend it for building econdary machines. I run all my VMs on an external SSD on an eSATA port, they are as fast (or faster because they have less crapware) than the host machine. 

- - - - - - -
working on all sorts of things including www.tvCAD.tv & www.CADreplace.com
0 Likes
Message 31 of 59

tim-bot
Advocate
Advocate

Glad i'm not the only one having this issue, thought i was doing something stupid... unfortunatly, after i tried to debug my application the first time in 2017, it seems to have broken the licensing mechanisim for CADmep... but only when it's loaded through the command line arguments.

0 Likes
Message 32 of 59

Anonymous
Not applicable
When the **** will it be fixed? It's annoying to debug with absence of Edit and Continue.
0 Likes
Message 33 of 59

Anonymous
Not applicable

I guess it's something about the whole architecture... last time they recognized the problem was with ACAD 2013, and was fixed with ACAD 2015...

 

Lately I'm doing maintainance working with ACAD 2016 and VS 2013. The DLLs should run without problem also in ACAD 2017... I mean, so they did with my plugins for 2016, they just extended compatibility to 2017 and they actually work... I have still to check bigger and more complex application we use internally.

 

For my office I postponed 2017 upgrades to a date to be still defined, maybe we'll wait for 2018 hoping it will be better suited for developers...

 

Of course an official word from Autodesk would be much appreciated... 😉

0 Likes
Message 34 of 59

Virupaksha_aithal
Autodesk Support
Autodesk Support
Accepted solution

Hi

 

AutoCAD engineering team is working on issues related to VS 2015 debugger and AutoCAD. At present no time line is set for the resolution. Hopefully we will have the resolution for this issue in AutoCAD 2017 itself



Virupaksha Aithal KM
Developer Technical Services
Autodesk Developer Network

Message 35 of 59

Anonymous
Not applicable

Thank you Viru,

your words are very much appreciated, really.

 

Max

0 Likes
Message 36 of 59

kerry_w_brown
Advisor
Advisor

 

 


@Virupaksha_aithal wrote:

Hi

 

AutoCAD engineering team is working on issues related to VS 2015 debugger and AutoCAD. At present no time line is set for the resolution. Hopefully we will have the resolution for this issue in AutoCAD 2017 itself


 

Has there been any progress on this issue , or with the Edit AndContinue debugging ?

 

I think it's about time AutoDesk took it's responsibilitys seriously. Pointing to 3 year old blog posts relating to a different build and a different API just doesn't cut it for me.

 

Regards

 

 

 


// Called Kerry or kdub in my other life.

Everything will work just as you expect it to, unless your expectations are incorrect. ~ kdub
Sometimes the question is more important than the answer. ~ kdub

NZST UTC+12 : class keyThumper<T> : Lazy<T>;      another  Swamper
Message 37 of 59

CADbloke
Advocate
Advocate

@Virupaksha_aithal wrote:

Hi

 

AutoCAD engineering team is working on issues related to VS 2015 debugger and AutoCAD. At present no time line is set for the resolution. Hopefully we will have the resolution for this issue in AutoCAD 2017 itself


No, they're not, they are working on the shiny new Forge platform. That's what https://developer.autodesk.com/ is all about these days, there is not even a mention of all this boring legacy stuff we all paid for.

 

Meanwhile, loyal paying customers trying to do some work with the platforms we are paying for are being ignored. See also http://forums.autodesk.com/t5/net/realdwg-installer-why-so-cryptic/td-p/6341741  and a whole lot of other posts on this forum and www.theswamp.org. While Autodesk goes chasing shiny 3D Internets their customers will go chasing reliable means to do our jobs - REAL jobs.

 

Throwing 100% of your resources at shiny new R&D to disrupt the status quo is the stuff of startups, not how you treat your paying customers who are the status quo. 

- - - - - - -
working on all sorts of things including www.tvCAD.tv & www.CADreplace.com
Message 38 of 59

Anonymous
Not applicable

Hello,

 

@Anonymous summarized 2 months ago:

 

So far, for .NET only projects we can still use VS2013 and ACAD2016 for development and debug, then use the same DLL in AutoCAD 2017.
Otherwise, you can use:
- VS2013 + ACAD2017: no ribbon, E&C works
- VS2013 + ACAD2017 + Debug Compat Mode On: ribbon ok, E&C doesn't work
- VS2015 + ACAD2017: no ribbon, no commands recognized
- VS2015 + ACAD2017 + Debug Compat Mode On: ribbon ok, commands ok, E&C doesn't work

 

Did Autodesk solved this issue? Edit and continue feature is enabled with VS2015 and ACAD2017?

 

We are trying to develop first in ACAD2016 and C3D2016 (and use E&C) but some codes don’t work with 2017 versions. We are losing so much time reprogramming here. Seems to me a hard throwback. It is amazing how Autodesk let it happen…

 

Thanks,

Message 39 of 59

tleaxavia
Participant
Participant

I can not understand how this bug could happen? What are the quality tests of Autodesk?

 

This is such a bad story starting with:

 

http://through-the-interface.typepad.com/through_the_interface/2013/11/debugging-autocad-using-visua...

 

Regards,

Thomas.

0 Likes
Message 40 of 59

Anonymous
Not applicable

I guess AutoCAD code nowadays became so huge and complicated that I bet they may even have fear to touch anything in that 'legacy' code.

In last revisions they made some steps to clean the internal structure, like the clear distinction between 'core' and UI functions, but I fear that was just another good initiative that will never get to a clean conclusion.

 

I've been working with AutoCAD products since... let's say European version 2.11, so I have some experience from this side of the barricade... and I know there are very good men working on it, just think at what we have today, so huge steps have been done, but there is something that always bothered me, expecially with latest 4/5 versions: they have good start point in some direction, but they do not complete the process...

 

Some examples?

- .NET support had had huge improvements between releases 2006 and 2009, but since then very little has been done. Not every ObjectARX classes has been exposed yet, some very important like the Associative Framework;

 

- in 2012 we saw the new Model Documentation functions, but since then hasn't been improved, they remain something not very well integrated with the rest of the environment and they haven't been exposed as API;

 

- we have been introduced to acCoreConsole.exe in (2013?), but it's not yet officially supported and documentation is still the same since its introduction;

 

I do not mention MAC support because I'm not current... is still there?

 

What I say is that sometime AutoDesk should sit at a table and just look back and try to clean things up. I work in Europe and despite the huge steps we made for living in a ultra broad-band world, real daily job is still very far from cloud services, points cloud, Forge platforms of VR handling... everything really fun, but not today.

I understand the need of R&D for future needs, but here the suspect is R&D is getting all the resources available... and it's not just an ipotesi, since I clear remember an answer from ADN support where they apologize for delay in answering because they where busy with the Forge platform event... so? you pull men from a paid service and allocate them for a event of a still-to-come platform that probably I'll never use?

I can just make speculations about what's happening with the development teams...   Smiley Frustrated

 

Today we need a faster and more stable AutoCAD, that may use some more of the processor power we have now;

we need an AutoCAD/DWG format less prone to errors and damages, I don't want to spend hours in Auditing and Recovering;

we need current command set to work well and well integrated;

we need a development platform with a clear roadmap ahead;

we need quick and clear support to emerging standards, like IFC file formats import AND export, I cannot afford to buy and learn Revit just for a low quality BIM model (I know you'd like I did!);

and so on, I bet our fellow colleagues would add dozen of point to this list...

 

By the way, where should we publish a list like this? I've seen the IDEAS section of the site, but... where is the AutoCAD section???

 

I don't expect an answer from AutoDesk, after all this is not even a question... but it'd be nice if they'd read it...

 

Sorry for the outburst! I feel better now 😉