.NET

Reply
Valued Contributor
kevinsir
Posts: 78
Registered: ‎08-20-2012
Message 11 of 12 (66 Views)

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*
Hallex
Posts: 1,569
Registered: ‎10-08-2008
Message 12 of 12 (55 Views)

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

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