Announcements
Notice: Upload of PDF documents is currently unavailable across the Community due to an ongoing issue.

SharpDevelop Forms Designer not working in Revit 2021

SharpDevelop Forms Designer not working in Revit 2021

sragan
Collaborator Collaborator
10,230 Views
24 Replies
Message 1 of 25

SharpDevelop Forms Designer not working in Revit 2021

sragan
Collaborator
Collaborator

In Revit 2020, I can create a new C# module, create a new C# Macro, go to Project, Add New Item, and add a WPF C# Window which is named Window1.

 

If I then select the Window1 I can view the code.  Clicking the "Design" tab at the bottom of the code window shows a preview of the window.

 

In Revit 2021, I get no preview.  Just an error message:

 

System.NullReferenceException: Object reference not set to an instance of an object.
at ICSharpCode.FormsDesigner.Services.TypeResolutionService..ctor()
at ICSharpCode.WpfDesign.AddIn.MyTypeFinder..ctor()
at ICSharpCode.WpfDesign.AddIn.MyTypeFinder.Create(OpenedFile file)
at ICSharpCode.WpfDesign.AddIn.WpfViewContent.LoadInternal(OpenedFile file, Stream stream)
at ICSharpCode.SharpDevelop.Gui.AbstractViewContentHandlingLoadErrors.Load(OpenedFile file, Stream stream)

 

Is there any fix?  

0 Likes
Accepted solutions (1)
10,231 Views
24 Replies
Replies (24)
Message 21 of 25

Organon
Advisor
Advisor

@H.echeva,

 

It works for me, but you have to do it every time you open Revit.

 

This problem only occurs from version 2021, so you can use version 2019/2020.

 

Regards,


Arquitectura | Análisis CAD & BIM | Diseño Paramétrico | Programación
BIM-METADATA | LinkedIn | YouTube
Message 22 of 25

H.echeva
Advocate
Advocate

Well, I think I found another (radical) solution.

I have copied the content of the folder SDA from 2018 to the folder in 2022.

The form works! I hope I haven't broken anything. I have kept a backup just in case.

Message 23 of 25

Organon
Advisor
Advisor

@H.echeva,

 

That was a risky move. 😃👍


Arquitectura | Análisis CAD & BIM | Diseño Paramétrico | Programación
BIM-METADATA | LinkedIn | YouTube
0 Likes
Message 24 of 25

sragan
Collaborator
Collaborator

Oddly enough, the Forms Designer works again on a fresh install of Revit 2024.

 

Strange.

Message 25 of 25

rbustos
Explorer
Explorer

I found a possible solution:
copy the SDA from Revit 2019 to Revit 2023

 

rbustos_0-1722519843122.png

 

0 Likes