parameter name 'typeid' error

parameter name 'typeid' error

Anonymous
Not applicable
1,050 Views
2 Replies
Message 1 of 3

parameter name 'typeid' error

Anonymous
Not applicable

I am pretty new to this so I hope I am posting in the right forum. I downloaded a freely available macro (thanks to Michael Kilkelly, archsmarter.com), modified to my needs, and am using successfully. However, it throws an error even though the macro itself completes successfully. And in the interest of self-teaching I am posting here and not to the macro creator.

 

I have attached a screenshot of the error. I've tried tracking down the error in the code but can't find a line 540 anywhere, have no idea why it is looking at a d:/ path, and don't know what the 'function Autodesk::Revit::Proxy::DB::ElementPRoxy::ChangeTypeId' is exactly. There are no errors during the build except an 'implicit conversion from 'string' to 'char'' which was present before I began making changes.

 

Any help is appreciated. Thank you.

0 Likes
Accepted solutions (1)
1,051 Views
2 Replies
Replies (2)
Message 2 of 3

arnostlobel
Alumni
Alumni
Accepted solution

N_nmulder:

 

The message you observed refers to a line inside Revit internal code from which the exception is actually thrown. The  code complains about a typeId argument that is apparently null when some code somewhere invoked the method Element.ChangeTypeId. I assume the call was made from inside your macro at some point, but that is naturally hard to tell without having seen the macro. Since it the macro was not written by you from scratch I suggest you search the code for "ChangeTypeId" to see if it is present there somewhere. If so, which I expect, try to see of the typeId argument that is passed onto the method could possibly be null under some circumstances.

Arnošt Löbel
Message 3 of 3

Anonymous
Not applicable

Thanks for the quick reply! I did indeed find 'ChangeTypeId' in the code. I commented it out as it didn't apply to my use and the error is gone. 

 

Thank you!

0 Likes