Revit API Forum
Welcome to Autodesk’s Revit API Forums. Share your knowledge, ask questions, and explore popular Revit API topics.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Modifying revit config

2 REPLIES 2
Reply
Message 1 of 3
Anonymous
982 Views, 2 Replies

Modifying revit config

Hi,

Am creating a plugin in c# that is going to be a floating window, I want the window to communicate with a service.  Todo this I need to put some endpoints into the config but I don't want to do this by hand and I was just wondering if you guys have come across needing to include some custom settings in the config and how you got around it.

Thanks,
Chris

2 REPLIES 2
Message 2 of 3
Joe.Ye
in reply to: Anonymous

 

Hi Chris,

 

I think you can use the methods and classes in .NET framework to access the standard Revit.exe.config file.

Here is links about accessing XML file.

 

http://www.c-sharpcorner.com/UploadFile/mahesh/ReadWriteXMLTutMellli2111282005041517AM/ReadWriteXMLT...

 

http://www.codeproject.com/Articles/11589/Read-Write-Configuration-in-XML-file

 

Sorry no handy code shows the process.



Joe Ye
Contractor
Developer Technical Services
Autodesk Developer Network
Message 3 of 3
marcart
in reply to: Anonymous

I was having the same issue. I wanted to set the ConnectionString property in the Revit.exe.config file programmatically, to be able to us Entity Framework.

I end up using the NET Framework ConfigurationManager Class. 

 

More info:

 

http://msdn.microsoft.com/en-us/library/system.configuration.configurationmanager.aspx

http://stackoverflow.com/questions/15900612/how-to-read-write-this-app-config-setting

 

 

 

 

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


Rail Community