all groups > visual studio .net ide > april 2006 >
You're in the

visual studio .net ide

group:

obtain the name of the current subroutine



obtain the name of the current subroutine Terry
4/21/2006 12:00:00 AM
visual studio .net ide: Hi,

I am trying to write a macro that can write a line such as:
LogPrint("Subroutine <SubName> in Module <ModName>"

and I am stuck getting the current subroutine name <SubName>.
The module name is OK - it is
Dim instance As CodeElement2

MsgBox(item.Name )

Any help is much appreciated.



cheers

Terry



Re: obtain the name of the current subroutine Carlos J. Quintero [VB MVP]
4/21/2006 12:00:00 AM
Hi Terry,

See my article:

HOWTO: Get the code element at the cursor from a Visual Studio .NET
macro or add-in

http://www.mztools.com/articles/2006/MZ009.htm

--

Best regards,

Carlos J. Quintero

MZ-Tools: Productivity add-ins for Visual Studio
You can code, design and document much faster:
http://www.mztools.com



"Terry" <tDOTcallaghan@bigpondDOT.com> escribió en el mensaje
news:44486dca$1_1@news.peopletelecom.com.au...
[quoted text, click to view]

Re: obtain the name of the current subroutine Terry
4/22/2006 12:00:00 AM
Thanks Carlos,

I'll check it out.
The idea for this actually came from MZ-tools for VB6 (a great add-in!)

Actually, the time I have already spent on this would I have been better
just to buy the NET version of MZ-tools (which I shall) - dumb to waste any
more of my time when you've aleady done it!

cheers
Terry



[quoted text, click to view]


Re: obtain the name of the current subroutine Carlos J. Quintero [VB MVP]
4/24/2006 12:00:00 AM
Hi Terry,

Yes, the .NET versions of MZ-Tools has that and other new features and even
a MZ-Tools SDK to extend it...

Let me know if you need further assistance.

--

Best regards,

Carlos J. Quintero

MZ-Tools: Productivity add-ins for Visual Studio
You can code, design and document much faster:
http://www.mztools.com


"Terry" <tDOTcallaghan@bigpondDOT.com> escribió en el mensaje
news:4449d028_9@news.peopletelecom.com.au...
[quoted text, click to view]

AddThis Social Bookmark Button