Revit API Forum
Welcome to Autodesk’s Revit API Forums. Share your knowledge, ask questions, and explore popular Revit API topics.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Do Transactions block out external variables

1 REPLY 1
SOLVED
Reply
Message 1 of 2
AncientOne
320 Views, 1 Reply

Do Transactions block out external variables

Is there anyway to pass a variable from a Revit macro to an add-in.

Basically I have a "document opened" event handler in my add-in transaction which I want to pick up a user determined "keyword" variable.

The only way I can think of allowing this is for the user to edit the "keyword" in the macro code. Then the add-in picks this up when a document is "opened".

But I think the add-in transaction is blocking access to the external variable. Emphasis on the think here.

Any ideas would be much appreciated.

 

1 REPLY 1
Message 2 of 2
arnostlobel
in reply to: AncientOne

Hello AncientOne,

 

I am afraid you'll need to elaborate a little more on your case, for the description you've provided so far is a bit cloudy to me. First of all, there is not "Document Opened" event in a "Transaction," at least as far as Revit "Transaction" goes. Also, Revit Transactions do not have anything to do with any "variables" in users' applications; therefore there is no "blocking" of access to variables.

 

As for "sharing" of variables between your external application and macros, I am afraid there is no direct sharing, for macros are executed in a different assembly. However, there is plenty of ways of sharing available in the Windows API (and .NET). For example, you could use a memory mapped files. However, such techniques go way beyond typical Revit programming.

 

Cheers

Arnošt Löbel

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk DevCon in Munich May 28-29th


Rail Community