.NET

.NET

Reply
Valued Contributor
78 Posts
0 Kudos
Registered: ‎08-20-2012
Post 11 of 12

Re: The layer properties has been set to visible, but layers still can't see

10-13-2012 08:11 PM in reply to: kevinsir

I use custom command!

I find that when I excute the opendwg funtion of  documentcollection

it is different of these two function。

[CommandMethod("openDwg",CommandFlags.Session)]

public void OpenDwg(string fileName)        

{            

Document activeDocument = Application.DocumentManager.Open(fileName,false,string.Empty);  

///after this function  activeDocument is the activedocument 

}

//if i remove the commandflags

[CommandMethod("openDwg")]

public void OpenDwg(string fileName)       

{            

Document activeDocument = Application.DocumentManager.Open(fileName,false,string.Empty); 

///after this function  activeDocument is  ‘drawing1’

///

}

*Expert Elite*
1,569 Posts
171 Kudos
Registered: ‎10-08-2008
Post 12 of 12

Re: The layer properties has been set to visible, but layers still can't see

10-14-2012 09:39 AM in reply to: kevinsir

Then try again these both commands with adding this line,

but keep the CommandFlags still the same

 

Application.DocumentManager.DocumentActivationEnabled = true;

 

~'J'~

_____________________________________
C6309D9E0751D165D0934D0621DFF27919
Post to the Community

Have questions about Autodesk products? Ask the community.

New Post