Debug messages with SharpDevelop

Debug messages with SharpDevelop

VaclavC
Contributor Contributor
1,751 Views
3 Replies
Message 1 of 4

Debug messages with SharpDevelop

VaclavC
Contributor
Contributor

Hello,

 

  I'am trying to write simple macros in Revit. Frist I tried some in RevitPythonShell (https://github.com/architecture-building-systems/revitpythonshell). They are working. Now I'am trying to work with something prebuilt in Revit, so I'am trying Macro manager with SharpDevelop (preinstalled). Trying with Python and C#. It seems to work, but I'am missing debug messages. Tried Debug.WriteLine(...) in C#, but the output is nowhere show. How can I produce any debug messages with Revit and SharpDevelop?

 

0 Likes
1,752 Views
3 Replies
Replies (3)
Message 2 of 4

jeremytammik
Autodesk
Autodesk

You could always print to a file and view that in an editor side by side.

 

I implemented a simple error log that you could base you debug messaging system on in 

 

https://github.com/jeremytammik/rvtmetaprop

 

Look at these lines, and all the lines putting together the list of leog message strings:

 

https://github.com/jeremytammik/rvtmetaprop/blob/master/rvtmetaprop/Command.cs#L426-L437

 

If you close the file after every line and your editor support live updates, you should see the messages appear as they are created.

 

There are certainly other, better, simpler and more proper (properer?) ways of handling this as well.

 

Cheers,

 

Jeremy



Jeremy Tammik
Developer Technical Services
Autodesk Developer Network, ADN Open
The Building Coder

0 Likes
Message 3 of 4

VaclavC
Contributor
Contributor

Good idea, thank you.

0 Likes
Message 4 of 4

Revitalizer
Advisor
Advisor

Hi,

 

there is also an Application.WriteJournalComment method, so you could use Revit's built-in logging file(s).

 

 

Revitalizer




Rudolf Honke
Software Developer
Mensch und Maschine





0 Likes