.NET

Reply
Distinguished Contributor
GeeHaa
Posts: 150
Registered: ‎04-14-2005
Message 1 of 4 (104 Views)
Accepted Solution

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

104 Views, 3 Replies
05-02-2014 08:50 AM

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

Distinguished Contributor
GeeHaa
Posts: 150
Registered: ‎04-14-2005
Message 2 of 4 (93 Views)

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

05-02-2014 02:09 PM 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

*Expert Elite*
norman.yuan
Posts: 967
Registered: ‎04-27-2009
Message 3 of 4 (78 Views)

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

05-02-2014 02:38 PM 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.

Distinguished Contributor
GeeHaa
Posts: 150
Registered: ‎04-14-2005
Message 4 of 4 (77 Views)

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

05-02-2014 02:54 PM 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

You are not logged in.

Log into access your profile, ask and answer questions, share ideas and more. Haven't signed up yet? Register

Announcements
Are you familiar with the Autodesk Expert Elites? The Expert Elite program is made up of customers that help other customers by sharing knowledge and exemplifying an engaging style of collaboration. To learn more, please visit our Expert Elite website.

Need installation help?

Start with some of our most frequented solutions to get help installing your software.

Ask the Community