Hi,
I Have a program that Opens a new drawing and Accesses the Editor which runs in AutoCAD 2010,but when I convert it to Vb.Net Express 2010 and AutoCAD 2013 by adding accoremgd and Import DocumentCollectionExtension It stops when it tries to access the getpoint method and throws an exception eNotApplicable. Has anyone else run into this problem? I am using CommandFlags.Session.
Thanks in Advance
Solved! Go to Solution.
Solved by GeeHaa. Go to Solution.
I figured it out.
Even though it was opening a new document it was not setting that document active.I looked up the problem in this discussion group and found that if I add this statement to the begining of the Program It works.
Autodesk.AutoCAD.ApplicationServices.Application.SetSystemVariable("NEXTFIBERWORLD", 1)
Thanks
While you have found the reason why it was not working, programmtically setting the system variable "NEXTFIBERWOLRD" is not the way to make sure your code work OK, because the "FIBERWORLD" variable's value change only takes effect after restart AutoCAD session.
Changing "FIBERWORLD" with "NEXTFIBERWORLD" is only meant for ObjectARX/ObjectARX .NET programmingm because of Visual Studio not being able to debug correctly in certain situation when "FIBERWORLD" is 1. AutoCAD user should never set "FIBERWORLD" to 0.
So, setting "FIBERWORLD" in code does not make sense as application code.
Norman Yuan
Thanks very Much for you input I don't want to post wrong information. I did notice it crashed when I ran it in 2014 the first time but it didn't register with me that the statement was not working as intended. When I ran it the second time after closing and reopening it worked. I guess I will have to change it in my users ACADDOC.lsp file
Thanks