this is the statement that i thought should work:
commandData.Application.ActiveAddInId;
Error: Only assignment, call, increment, decrement, and new object expressions can be used as a statement
this is the statement that i thought should work:
commandData.Application.ActiveAddInId;
Error: Only assignment, call, increment, decrement, and new object expressions can be used as a statement
You're seeing that because you're not assigning the value to a variable. The Active AddInId variable is just a string representing a GUID, so it can't be called as a statement.
What are you trying to accomplish here?
If you want to retrieve the Id of an addin you should create a variable and then assign the AddinId
property. According the to the revit API documention the ActiveAddInId
variable is of the class AddInId
. So your code should look something like this.
AddInId id = commandData.Application.ActiveAddInId;