stepalibre
Alibre Super User
AlibreX code goes in SubmitUI()
C#:
private static unsafe void SubmitUI()
{
ImGui.Begin("Alibre Design Tools WIP 1");
if (ImGui.Button("open"))
{
//AlibreToImGuiProcessing();
}
ImGui.End();
ImGui.Begin("Script Generator");
if (ImGui.Button("open"))
{
//AlibreToImGuiProcessing();
}
ImGui.End();
ImGui.Begin("Run Scripts");
if (ImGui.InputText("Input Field", ref _text, 100))
{
}
ImGui.End();
ImGui.InputTextMultiline("Output", ref _textArea, 900, new System.Numerics.Vector2(1500, 1000));
if (ImGui.Button("Run Script"))
{
//RunLINQPadScript(_textArea);
}
var size = ImGui.GetWindowSize();;
ImGui.Text(size.X.ToString());
ImGui.Text(size.Y.ToString());
ImGui.Text(size.ToString());
ImGui.End();
ImGui.Begin("Alibre Design");
var size2 = ImGui.GetWindowSize();
if (ImGui.Button("Create"))
{
IADSession Session;
IAutomationHook Hook;
IADRoot Root;
IADPartSession AdPart;
Hook = (IAutomationHook)GetActiveObject("AlibreX.AutomationHook", true);
Root = (IADRoot)Hook.Root;
Session = Root.TopmostSession;
AdPart = (IADPartSession)Session;
Console.WriteLine(AdPart.FilePath);
string desktopPath = System.Environment.GetFolderPath(System.Environment.SpecialFolder.Desktop);
string outputPath = Path.Combine(desktopPath, "output.png");
AdPart.SaveCurrentViewSnapshot(outputPath, 800, 800);
};
var size4 = ImGui.GetWindowPos();
ImGui.Text(size4.X.ToString());
ImGui.Text(size4.Y.ToString());
ImGui.Text(size2.X.ToString());
ImGui.Text(size2.Y.ToString());
ImGui.Text(size2.ToString());
ImGui.End();
}
That's it. Useful when debugging code while building an addon, scripting and learning AlibreX. Anything.
I love it! Much faster workflow.
GitHub - ocornut/imgui: Dear ImGui: Bloat-free Graphical User interface for C++ with minimal dependencies
Dear ImGui: Bloat-free Graphical User interface for C++ with minimal dependencies - ocornut/imgui
github.com
GitHub - ImGuiNET/ImGui.NET: An ImGui wrapper for .NET.
An ImGui wrapper for .NET. Contribute to ImGuiNET/ImGui.NET development by creating an account on GitHub.
github.com