Author Topic: Cannot set MdiActiveDocument  (Read 16991 times)

0 Members and 1 Guest are viewing this topic.

Jeff_M

  • King Gator
  • Posts: 3982
  • C3D user & customizer
Re: Cannot set MdiActiveDocument
« Reply #30 on: October 14, 2013, 07:12:03 PM »
I, too, get the same result as Bryco & mohnston.

Bryco

  • Water Moccasin
  • Posts: 1851
Re: Cannot set MdiActiveDocument
« Reply #31 on: October 14, 2013, 09:06:07 PM »
nextfiberworld=1  and it works.
Even loading Will's dll works.
I thought you only had to set that to debug while using windows forms.

I don't use the ribbon but does anyone have problems w/
nextfiberworld=1 and the ribbon?

Jeff_M

  • King Gator
  • Posts: 3982
  • C3D user & customizer
Re: Cannot set MdiActiveDocument
« Reply #32 on: October 14, 2013, 10:01:02 PM »
I don't use the ribbon but does anyone have problems w/
nextfiberworld=1 and the ribbon?
Yes. When debugging I use this setting but, in Civil3D 2013 & 2014, when i open the first drawing I must select a command on the ribbon that brings up a toolbar in order for it to complete the loading of the drawing, else it will sit there and not accept any commands. A royal PITA so when doing real work I always make sure to set it back to 0. It sounds like what you are seeing may be related to what I see.

WILL HATCH

  • Bull Frog
  • Posts: 450
Re: Cannot set MdiActiveDocument
« Reply #33 on: October 14, 2013, 11:28:45 PM »
Trying that code snippet with 2013 and 64bit I get the new drawing name for last 2 message boxes
I get the same result as Jeff. Windows 8 x64

After switching NEXTFIBERWORLD to 0 I get the same problems you guys are having.  I've never switched it before to debug like was mentioned by Kean http://through-the-interface.typepad.com/through_the_interface/2011/09/no-source-available-when-debugging-an-autocad-plug-in.html

I found something posted by Fenton Webb that confirms this behavior http://forums.autodesk.com/t5/NET/Visual-Studio-Edit-and-Continue-not-working-anymore/m-p/4310378#M35693
« Last Edit: October 14, 2013, 11:43:17 PM by WILL HATCH »

Jeff H

  • Needs a day job
  • Posts: 6083
Re: Cannot set MdiActiveDocument
« Reply #34 on: October 15, 2013, 09:48:42 AM »
nextfiberworld=1  and it works.
Even loading Will's dll works.
I thought you only had to set that to debug while using windows forms.

I don't use the ribbon but does anyone have problems w/
nextfiberworld=1 and the ribbon?
What happens if you use OpenFileDialog from Autodesk.AutoCAD.Windows and remove reference from System.Windows.Form?

Bryco

  • Water Moccasin
  • Posts: 1851
Re: Cannot set MdiActiveDocument
« Reply #35 on: October 15, 2013, 11:13:39 AM »
I'll try test that tonight.
I have to press escape sometimes to work in a dwg I have just opened.
So perhaps that is part of the fiber thing.

Interesting to me is that Will's dll loaded no matter what the fiber setting was after I had initially changed the setting.

WILL HATCH

  • Bull Frog
  • Posts: 450
Re: Cannot set MdiActiveDocument
« Reply #36 on: October 15, 2013, 11:17:35 AM »
I'll try test that tonight.
I have to press escape sometimes to work in a dwg I have just opened.
So perhaps that is part of the fiber thing.

Interesting to me is that Will's dll loaded no matter what the fiber setting was after I had initially changed the setting.
did you restart autocad after changing that value? A restart is required to change things, which is why we have write access to the NEXTFIBERWORLD variable and not FIBERWORLD

Bryco

  • Water Moccasin
  • Posts: 1851
Re: Cannot set MdiActiveDocument
« Reply #37 on: October 15, 2013, 02:27:48 PM »
I THOUGHT I DID,  this time at 0  it errors out
is your dll from debug or release?

WILL HATCH

  • Bull Frog
  • Posts: 450
Re: Cannot set MdiActiveDocument
« Reply #38 on: October 15, 2013, 03:53:43 PM »
It's probably a debug version, I didn't do anything for that except create a new project, paste in code, and compile

Jeff H

  • Needs a day job
  • Posts: 6083
Re: Cannot set MdiActiveDocument
« Reply #39 on: October 15, 2013, 04:34:53 PM »
How about someone having problems load up a project?
 
Try loading one like the attached example how you would do with source control.
Where no reason to resolve any references etc....
Should open and build with no changes and see if any difference.
 
 

Jeff_M

  • King Gator
  • Posts: 3982
  • C3D user & customizer
Re: Cannot set MdiActiveDocument
« Reply #40 on: October 15, 2013, 05:21:31 PM »
Using MdiDoc project:
This was with Fiberworld=0 in C3D2014

Jeff_M

  • King Gator
  • Posts: 3982
  • C3D user & customizer
Re: Cannot set MdiActiveDocument
« Reply #41 on: October 15, 2013, 05:26:14 PM »
Changed Fiberworld = 1, the active drawing is now shown correctly.

WILL HATCH

  • Bull Frog
  • Posts: 450
Re: Cannot set MdiActiveDocument
« Reply #42 on: October 15, 2013, 05:58:10 PM »
Changed Fiberworld = 1, the active drawing is now shown correctly.
Can you confirm you restarted autocad after making the change?

mohnston

  • Bull Frog
  • Posts: 305
  • CAD Programmer
Re: Cannot set MdiActiveDocument
« Reply #43 on: October 15, 2013, 06:26:26 PM »
Thanks everyone for testing and exploring.
Nextfiberworld = 0   - fail
Nextfiberworld = 1 then restart AutoCAD   - success

It's amazing what you can do when you don't know what you can't do.
CAD Programming Solutions

Jeff_M

  • King Gator
  • Posts: 3982
  • C3D user & customizer
Re: Cannot set MdiActiveDocument
« Reply #44 on: October 15, 2013, 06:57:24 PM »
Changed Fiberworld = 1, the active drawing is now shown correctly.
Can you confirm you restarted autocad after making the change?
Yes, I always restart after changing this.