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

Opening a New Drawing and Accessing the editor in AutoCAD 2013 VB.Net

3 REPLIES 3
SOLVED
Reply
Message 1 of 4
GeeHaa
433 Views, 3 Replies

Opening a New Drawing and Accessing the editor in AutoCAD 2013 VB.Net

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

3 REPLIES 3
Message 2 of 4
GeeHaa
in reply to: GeeHaa

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

Message 3 of 4
norman.yuan
in reply to: GeeHaa

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

Drive CAD With Code

EESignature

Message 4 of 4
GeeHaa
in reply to: 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

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