tune
This commit is contained in:
@@ -0,0 +1,193 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>Getting Started with HiAPI | HiAPI-C# 2025 </title>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<meta name="title" content="Getting Started with HiAPI | HiAPI-C# 2025 ">
|
||||
|
||||
|
||||
<link rel="icon" href="../../../img/HiAPI.favicon.ico">
|
||||
<link rel="stylesheet" href="../../../public/docfx.min.css">
|
||||
<link rel="stylesheet" href="../../../public/main.css">
|
||||
<meta name="docfx:navrel" content="../../../toc.html">
|
||||
<meta name="docfx:tocrel" content="../toc.html">
|
||||
|
||||
<meta name="docfx:rel" content="../../../">
|
||||
|
||||
|
||||
|
||||
<meta name="loc:inThisArticle" content="In this article">
|
||||
<meta name="loc:searchResultsCount" content="{count} results for "{query}"">
|
||||
<meta name="loc:searchNoResults" content="No results for "{query}"">
|
||||
<meta name="loc:tocFilter" content="Filter by title">
|
||||
<meta name="loc:nextArticle" content="Next">
|
||||
<meta name="loc:prevArticle" content="Previous">
|
||||
<meta name="loc:themeLight" content="Light">
|
||||
<meta name="loc:themeDark" content="Dark">
|
||||
<meta name="loc:themeAuto" content="Auto">
|
||||
<meta name="loc:changeTheme" content="Change theme">
|
||||
<meta name="loc:copy" content="Copy">
|
||||
<meta name="loc:downloadPdf" content="Download PDF">
|
||||
|
||||
<script type="module" src="./../../../public/docfx.min.js"></script>
|
||||
|
||||
<script>
|
||||
const theme = localStorage.getItem('theme') || 'auto'
|
||||
document.documentElement.setAttribute('data-bs-theme', theme === 'auto' ? (window.matchMedia('(prefers-color-scheme: dark)').matches ? 'dark' : 'light') : theme)
|
||||
</script>
|
||||
|
||||
</head>
|
||||
|
||||
<body class="tex2jax_ignore" data-layout="" data-yaml-mime="">
|
||||
<header class="bg-body border-bottom">
|
||||
<nav id="autocollapse" class="navbar navbar-expand-md" role="navigation">
|
||||
<div class="container-xxl flex-nowrap">
|
||||
<a class="navbar-brand" href="../../../index.html">
|
||||
<img id="logo" class="svg" src="../../../img/HiAPI.logo.png" alt="">
|
||||
|
||||
</a>
|
||||
<button class="btn btn-lg d-md-none border-0" type="button" data-bs-toggle="collapse" data-bs-target="#navpanel" aria-controls="navpanel" aria-expanded="false" aria-label="Toggle navigation">
|
||||
<i class="bi bi-three-dots"></i>
|
||||
</button>
|
||||
<div class="collapse navbar-collapse" id="navpanel">
|
||||
<div id="navbar">
|
||||
<form class="search" role="search" id="search">
|
||||
<i class="bi bi-search"></i>
|
||||
<input class="form-control" id="search-query" type="search" disabled placeholder="Search" autocomplete="off" aria-label="Search">
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</nav>
|
||||
</header>
|
||||
|
||||
<main class="container-xxl">
|
||||
<div class="toc-offcanvas">
|
||||
<div class="offcanvas-md offcanvas-start" tabindex="-1" id="tocOffcanvas" aria-labelledby="tocOffcanvasLabel">
|
||||
<div class="offcanvas-header">
|
||||
<h5 class="offcanvas-title" id="tocOffcanvasLabel">Table of Contents</h5>
|
||||
<button type="button" class="btn-close" data-bs-dismiss="offcanvas" data-bs-target="#tocOffcanvas" aria-label="Close"></button>
|
||||
</div>
|
||||
<div class="offcanvas-body">
|
||||
<nav class="toc" id="toc"></nav>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="content">
|
||||
<div class="actionbar">
|
||||
<button class="btn btn-lg border-0 d-md-none" type="button" data-bs-toggle="offcanvas" data-bs-target="#tocOffcanvas" aria-controls="tocOffcanvas" aria-expanded="false" aria-label="Show table of contents">
|
||||
<i class="bi bi-list"></i>
|
||||
</button>
|
||||
|
||||
<nav id="breadcrumb"></nav>
|
||||
</div>
|
||||
|
||||
<article data-uid="">
|
||||
<h1 id="getting-started-with-hiapi">Getting Started with HiAPI</h1>
|
||||
|
||||
<p>This guide will help you get started with HiAPI development.</p>
|
||||
<h2 id="installation">Installation</h2>
|
||||
<ol>
|
||||
<li><p>Create a dotnet project.</p>
|
||||
</li>
|
||||
<li><p>Setting the nuget server and account.</p>
|
||||
<p>The HiAPI installation is typical Nuget Package installation. You can apply global or local nuget setting.</p>
|
||||
<p>Here apply the local solution for startup. Create a file and name it to <code>nuget.config</code> in the same folder of your dotnet project file. the content of the file is as the following:</p>
|
||||
<pre><code class="lang-xml"><?xml version="1.0" encoding="utf-8"?>
|
||||
<configuration>
|
||||
<packageSources>
|
||||
<add key="HiAPI" value="https://superhightech-gitea.webredirect.org/api/packages/HiAPI/nuget/index.json" />
|
||||
<add key="nuget.org" value="https://api.nuget.org/v3/index.json" protocolVersion="3" />
|
||||
</packageSources>
|
||||
<packageSourceCredentials>
|
||||
<HiAPI>
|
||||
<add key="Username" value="xxxxxx" />
|
||||
<add key="ClearTextPassword" value="xxxxxx" />
|
||||
</HiAPI>
|
||||
</packageSourceCredentials>
|
||||
</configuration>
|
||||
</code></pre>
|
||||
</li>
|
||||
<li><p>In the dotnet project file, add the package reference.</p>
|
||||
<pre><code class="lang-xml"><ItemGroup>
|
||||
<PackageReference Include="HiNc" Version="3.1.*" />
|
||||
<!--optional-->
|
||||
<PackageReference Include="Hi.Wpf" Version="*" />
|
||||
</ItemGroup>
|
||||
</code></pre>
|
||||
</li>
|
||||
<li><p>In the program file, setting the HiNC application initialization and finalization.</p>
|
||||
<pre><code class="lang-csharp" name="SampleCode">using Hi.Disp;
|
||||
using Hi.HiNcKits;
|
||||
using Hi.Licenses;
|
||||
using Hi.MongoUtils;
|
||||
using System;
|
||||
|
||||
namespace Sample
|
||||
{
|
||||
/// <summary>
|
||||
/// A sample class demonstrating initialization and usage of the HiAPI framework.
|
||||
/// Shows the basic setup of display engine, MongoDB server, licensing, and other core functionality.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// This example serves as an entry point for those getting started with HiAPI.
|
||||
/// It demonstrates proper initialization and teardown of key components.
|
||||
/// ### Source Code
|
||||
/// [!code-csharp[SampleCode](~/../Hi.Sample/HelloHiAPI.cs)]
|
||||
/// </remarks>
|
||||
public static class HelloHiAPI
|
||||
{
|
||||
static int Main(string[] args)
|
||||
{
|
||||
Console.WriteLine("HiAPI starting.");
|
||||
LocalApp.AppBegin();
|
||||
|
||||
Console.WriteLine("Hello World! HiAPI.");
|
||||
|
||||
LocalApp.AppEnd();
|
||||
Console.WriteLine("HiAPI exited.");
|
||||
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
</code></pre></li>
|
||||
</ol>
|
||||
<h2 id="sample-code-to-start-a-">Sample Code to Start a <a class="xref" href="../../../api/Hi.MachiningProcs.MachiningProject.html">MachiningProject</a></h2>
|
||||
<p>See the following sample code to start a HiAPI application.</p>
|
||||
<ul>
|
||||
<li><a class="xref" href="../../sample/Sample.Machining.DemoBuildMachiningProject.html">DemoBuildMachiningProject</a>
|
||||
Build a <a class="xref" href="../../../api/Hi.MachiningProcs.MachiningProject.html">MachiningProject</a>.</li>
|
||||
<li><a class="xref" href="../../sample/Sample.Machining.DemoUseMachiningProject.html">DemoUseMachiningProject</a>
|
||||
Load a <a class="xref" href="../../../api/Hi.MachiningProcs.MachiningProject.html">MachiningProject</a> and run NC simulation.</li>
|
||||
<li><a class="xref" href="../../sample/Sample.Machining.DemoRenderingMachiningProcessAndStripPosSelection.html">DemoRenderingMachiningProcessAndStripPosSelection</a>
|
||||
Apply <a class="xref" href="../../../api/Hi.MachiningProcs.MachiningProject.html">MachiningProject</a> to 3D canvas with user-interaction in windows platform.</li>
|
||||
</ul>
|
||||
|
||||
</article>
|
||||
|
||||
<div class="contribution d-print-none">
|
||||
</div>
|
||||
|
||||
<div class="next-article d-print-none border-top" id="nextArticle"></div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="affix">
|
||||
<nav id="affix"></nav>
|
||||
</div>
|
||||
</main>
|
||||
|
||||
<div class="container-xxl search-results" id="search-results"></div>
|
||||
|
||||
<footer class="border-top text-secondary">
|
||||
<div class="container-xxl">
|
||||
<div class="flex-fill">
|
||||
<span> Copyright © 2025 <a href='https://superhightech.com.tw'>Tech Coordinate</a>. All rights reserved. <a href='https://superhightech.com.tw'>超級高科技股份有限公司</a> © 2025 版權所有 </span>
|
||||
</div>
|
||||
</div>
|
||||
</footer>
|
||||
</body>
|
||||
</html>
|
||||
Reference in New Issue
Block a user