Skip to content

Instantly share code, notes, and snippets.

View imAliAsad's full-sized avatar
:octocat:

Ali Asad imAliAsad

:octocat:
View GitHub Profile
@imAliAsad
imAliAsad / Win32Api.cs
Created March 25, 2018 12:37 — forked from teocomi/Win32Api.cs
Run Revit commands using Win32 API
/// <summary>
/// Run Revit commands using Win32 API
/// </summary>
public class Win32Api
{
[DllImport("user32.dll")]
private static extern IntPtr GetForegroundWindow();
[DllImport("user32.dll")]
static extern bool SetFocus(IntPtr hWnd);
///
/// Simple pooling for Unity.
/// Author: Martin "quill18" Glaude (quill18@quill18.com)
/// Latest Version: https://gist.github.com/quill18/5a7cfffae68892621267
/// License: CC0 (http://creativecommons.org/publicdomain/zero/1.0/)
/// UPDATES:
/// 2015-04-16: Changed Pool to use a Stack generic.
///
/// Usage:
///