Curious
❔ XML Read XML and save as dictionary
Hi all. I want to read XML data and convert to a dictionary, I have given this go with:
This is how i write:
This is how I am reading:
I get an error
Pref
is an unexpected token. The expected token is =
Line 2, position 20.25 replies
❔ Properties.Settings.Default producing different stored values when called from different winForms
Environment (Autodesk Revit API)
I am using
Properties.Settings.Default
and can update, reload or save the appropriate setting happily, however I am getting different values when trying to load the property from a different win form that setting was saved in.
For example, the following (generic names used)
Properties.Settings.Default.Setting1 = "default";
in winform1 I save a string:
Properties.Settings.Default.Setting1 = "string";
Then I save it. When reopening the winform I use the reload method. I then correctly see string
instead of default
, in the example. The setting was successfully updated.
However if I try to view this setting outside of winform1, say winform2, I only see the default
setting applied from inside VS.
Anyone have an idea why this could be happening or directions to fix?2 replies
✅ Win Form Event Handlers question
Hi, I was just wondering if there is an event handler when the win form is idle that I can then run code in. I am looking to use it as a modeless form alongside the Revit API to sync a 2D drawing and a 3D model view together. I am currently using the Revit API Idle event, however I want to change this method of functionality to be toggled via a button in a win form as it adds unnecessary load to the Revit application.
Once alternative method I thought about was running on a mouse move event, or if there is some kind of user input.
5 replies
❔ different variable type depending on condition of IF statement
Hi there, how would I go about having a different type on a variable with the same name, for later use? This is required for use in my code later on within the Autodesk RevitAPI
in my helpers class:
12 replies
❔ ✅ remove from list (RevitAPI)
I have started learning C# today. Please bare with me 🙂
I am trying to remove an element from an list if its existing, otherwise add it.
I seem too only be able to run whats in the else, and never if the list contains the element.
The logic works, as I have it in python already:
26 replies