0

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

2 Answers2

2

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?

Colin Stark
  • 591
  • 3
  • 15
2

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;
Sander Obdeijn
  • 459
  • 1
  • 5
  • 15