Skip to content

Instantly share code, notes, and snippets.

@vildar82
vildar82 / Automate
Created Sep 6, 2018
Civil automate insert shortcut by FlaUI
View Automate
internal static void Automate(UIJob uiJob)
{
Console.WriteLine("Нажми любую кнопку для старта:");
Console.ReadKey();
App = Application.Attach(uiJob.ProcessID);
using (Auto = new UIA3Automation())
{
var mainWin = App.GetMainWindow(Auto);
Console.WriteLine($"Главное окно - {mainWin.Name}");
var elem = mainWin.FindFirstByXPath("/Pane[@Name='Область инструментов']/Pane[@Name='Навигатор']");
@vildar82
vildar82 / PipesCatalog.cs
Last active Feb 27, 2018
Civil3D. Изменение каталога трубопроводных сетей.
View PipesCatalog.cs
// Изменение каталога трубопроводных сетей - для Рудольфа.
var regNetwork = $"{HostApplicationServices.Current.UserRegistryProductRootKey}\\Profiles\\" +
$"{Application.GetSystemVariable("CPROFILE")}\\Preferences\\AeccUiNetwork100";
using (var networkKey = Registry.CurrentUser.OpenSubKey(regNetwork, RegistryKeyPermissionCheck.ReadWriteSubTree))
{
networkKey.SetValue("SharedContentPath", @"C:\temp\ГП\Pipes Catalog\Aecc Shared Content");
networkKey.SetValue("DCE203A2-D381-466f-A23E-08A9D9F8FDBD",
@"C:\temp\ГП\Pipes Catalog\US Imperial Structures\US Imperial Structures.apc");
networkKey.SetValue("F670B5B9-DA12-476d-B461-4FB5C5650A82",
@"C:\temp\ГП\Pipes Catalog\Pipes Metric Russia\Pipes Metric Russia.apc");
@vildar82
vildar82 / 0_reuse_code.js
Created May 9, 2017
Here are some things you can do with Gists in GistBox.
View 0_reuse_code.js
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console