Reply

How can I find the currently active assembly member?

[ Edited ]

 

Hi,

 

  Can anyone help me find the currently active member of an assembly that is open?

  I can't seem to find any reference to which membe is active.  If I get the fullname of the active assembly, it gives me a name of "assyname.asm!Master" instead of the activated member.

  Any help / suggestions appreciated!

 

Thanks,

Chris.

 

Posted by: chris mann
Post date: 9/23/2008 1:53:31 AM

3 REPLIES

RE: How can I find the currently active assembly member?

[ Edited ]

Application.ActiveSelectSet ?

 

Posted by: Jason Newell
Post date: 9/23/2008 4:36:41 AM

RE: How can I find the currently active assembly member?

[ Edited ]

Jason,

 

Thanks for the suggestion, but that doesn't seem to return what I need.

I have an assembly open, which has 2 members. When I open the assembly (file - open) it then prompts me as to which member to open. The name of the active component in the title bar then says "SEAsm1.asm!First_Member" where the filename is "SEAsm1.asm" and I selected to load the member named "First_Member".

 

If I request the "FullName" for the activedocument, it returns "C:\working\SEAsm1.asm!Master " (regardless of which member I have active at the time). (Which seems wrong to me!)

 

Looking at the "ActiveDocument", then "AssemblyFamilyMembers" it lists the members and there is an "ActivateMember" function, but doesn't appear to say which is the currently active member (or which is the master member - something else I would like to know).

 

Thanks,

Chris.

 

Posted by: chris mann
Post date: 9/23/2008 4:59:57 AM

RE: How can I find the currently active assembly member?

[ Edited ]

 

Hi,

 

I search the same function.

 

My work a round is:

Get title name from active window "Application->GetActiveWindow()". Result is “SEAsm1.asm!First_Member”. Now your parsing string.

Attention: If read only opened this file. Then is result:  SEAsm1.asm!First_Member[read only]”

 

Paul

 

 

Posted by: Paul Gerling
Post date: 11/26/2008 10:31:58 AM