sharpdevelop error

sharpdevelop error

Anonymous
Not applicable
702 Views
3 Replies
Message 1 of 4

sharpdevelop error

Anonymous
Not applicable

ANyone know why this error happens:

 

System.Windows.Markup.XamlParseException: 'Set connectionId threw an exception.' Line number '112' and line position '6'. ---> System.InvalidCastException: [A]Alphas.FillPatternViewer.FillPatternViewerControlWpf cannot be cast to [B]Alphas.FillPatternViewer.FillPatternViewerControlWpf. Type A originates from 'Alphas, Version=1.0.5728.386, Culture=neutral, PublicKeyToken=null' in the context 'LoadNeither' in a byte array. Type B originates from 'Alphas, Version=1.0.5728.386, Culture=neutral, PublicKeyToken=null' in the context 'LoadNeither' in a byte array.

 

It seems to happen at random. I know it has nothing to do with my code. I build my macro--it shows this error when I try to run---I re-build the macro with no changes---the macro runs fine.

 

It's really annoying because sometimes I have to rebuild the macro 4 times before it works and sometimes I have to restart Revit completely.

0 Likes
703 Views
3 Replies
Replies (3)
Message 2 of 4

mikako_harada
Community Manager
Community Manager

Hi pkhlineworks, 

 

The error code itself does not ring a bell to me. But since nobody seems to have any suggestion, let me try to suggest something.  

 

You wrote "I know it has nothing to do with my code.".  Does this happen with a simple hello world code?  

 

You can also try to see if it happens with a sample rvt files, or specific files.  

 

Sometimes when an error shows up irregularly, one possibility is that a value are not correctly initialized. You may want to try stripping out a code and see if you can narrow down the issue.  Once you can create a minimum, reproduciable sample, it will help investigate further.

 

You may also try running with add-in so that you may be able to if it is only with macro environment or Revit API.

 


Mikako Harada
Developer Technical Services
0 Likes
Message 3 of 4

Anonymous
Not applicable

I'm working on a WPF component that will display fill patterns in a wpf window. The reason I know it's not my code is because the error comes up (or goes away) even when I don't make any changes to the code. I'm running the exact same data through the macro. Also the error happens when the wpf window is initializing.

 

I can only guess it is something to do with Sharpdevelp. I've also had Revit crash completely when I try to run a macro that I know works. Unfortunately, it is not reproducible. It happens at random.

0 Likes
Message 4 of 4

RmsMali
Contributor
Contributor
0 Likes