Archived
266 lines
16 KiB
HTML
266 lines
16 KiB
HTML
<!DOCTYPE html>
|
|
<html>
|
|
<head>
|
|
<meta charset="utf-8">
|
|
<title>Projects | HiAPI-C# 2025 </title>
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
<meta name="title" content="Projects | 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="projects">Projects</h1>
|
|
|
|
<p>A project is the whole of what a simulation runs against: the machine tool, the spindle capability,
|
|
the background and coolant conditions, the fixture, the workpiece, the tool house, the controller and
|
|
the NC programs a mission plays. It is a project file together with the folder that file sits in, and
|
|
the <strong>Project</strong> dropdown on the menu bar is where one is created, opened, saved and closed. The
|
|
equipment and mission screens are editors on whichever project is open, so a change of project
|
|
reaches all of them at once.</p>
|
|
<h2 id="where-it-is">Where it is</h2>
|
|
<p>The <strong>Project</strong> dropdown, at the left of the menu bar beside <strong>Page</strong> and <strong>Preference</strong>. Its first
|
|
row is a read-only field holding the path of the open project — selectable, so it can be copied — and
|
|
reading <em>No Project Loaded</em> until one is open. The path is written relative to the admin directory
|
|
the service was started against rather than as a location on the machine running it.</p>
|
|
<p>That row is the only place the path stays put; everywhere else it is transient — a line drawn while
|
|
something is happening, or a record of something that has. While a project action is running, the
|
|
footer's background zone names the action and the path together, as <em>Loading project: …</em> and its
|
|
equivalents for the other entries. The toast that reports the finished action carries the path as
|
|
its caption, and that line outlives the toast in the footer's <strong>Recent messages</strong> list. The service
|
|
holds one open project rather than one per browser, so every browser connected to it is working on
|
|
the same project.</p>
|
|
<h2 id="what-each-entry-does">What each entry does</h2>
|
|
<table>
|
|
<thead>
|
|
<tr>
|
|
<th>Entry</th>
|
|
<th>What it does</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
<tr>
|
|
<td><strong>New</strong></td>
|
|
<td>Creates a project at a chosen path and opens it, refusing a path that already holds a file</td>
|
|
</tr>
|
|
<tr>
|
|
<td><strong>Load</strong></td>
|
|
<td>Opens an existing project file</td>
|
|
</tr>
|
|
<tr>
|
|
<td><strong>ReLoad</strong></td>
|
|
<td>Re-reads the open project from its own path, discarding anything unsaved</td>
|
|
</tr>
|
|
<tr>
|
|
<td><strong>Save</strong></td>
|
|
<td>Writes the open project back to its own path</td>
|
|
</tr>
|
|
<tr>
|
|
<td><strong>Save As</strong></td>
|
|
<td>Writes it to a chosen path, which then becomes the open project</td>
|
|
</tr>
|
|
<tr>
|
|
<td><strong>Close Project</strong></td>
|
|
<td>Closes it, leaving the application with no project</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
<p><strong>ReLoad, Save, Save As and Close Project are greyed out until a project is open.</strong> New and Load are
|
|
always selectable.</p>
|
|
<p>The three entries that need a path — New, Load and Save As — open the shared file browser as a
|
|
picker, filtered to <strong>HiNC Project (*.hincproj)</strong>. It never offers the <strong>Resource</strong> root: the
|
|
<strong>Admin</strong> root is always there, and the <strong>Project</strong> root beside it only while a project is open. It
|
|
opens at the Admin root — in the folder the open project sits in, when there is one. Saving forces
|
|
the extension, so a name typed without one still gets it.</p>
|
|
<h2 id="what-a-project-actually-is">What a project actually is</h2>
|
|
<p>The project file is an XML document of references. Values that mean nothing outside this one project
|
|
are written into it directly, while the pieces that are shared, large or edited on their own — the
|
|
machine chain, the spindle capability, the workpiece and cutter materials, the cutting parameters,
|
|
the mesh geometry — are held as references to files beside it, each named by a path relative to the
|
|
project file's own folder. Opening the project file in a text editor shows those references rather
|
|
than what they point at.</p>
|
|
<div class="IMPORTANT">
|
|
<h5>Important</h5>
|
|
<p><strong>A reference that points at nothing does not stop the project opening.</strong> Load and ReLoad read what
|
|
they can and report what they could not — a missing STL, or a mesh-geometry <code>.wct</code> file a raw
|
|
geometry names — and the project comes up with that body simply having no geometry, the action
|
|
still reporting success. The message is the only thing that says otherwise, and it is not kept
|
|
where a run's messages are kept: see
|
|
<a href="messages-and-logs.html#messages-a-project-load-raises">Messages a project load raises</a>.</p>
|
|
</div>
|
|
<p>A project is therefore a folder at least as much as a file. Copying one to another machine, archiving
|
|
one, or handing one to somebody else means taking the folder.</p>
|
|
<p>The demo project's own folder, at <code>/util/file-explorer/Project</code>. The File Explorer's root switcher,
|
|
beside the page name, is set to <strong>Project</strong> — the root that exists only while a project is open, and
|
|
that resolves to the folder holding the open project file — and the path field reads <code>.</code>, the root
|
|
folder itself. Three folders sit at the top, <strong>MachineTool</strong>, <strong>NC</strong> and <strong>Output</strong>, and five files
|
|
below them: the cutting parameters and the workpiece material, the project file itself at about
|
|
135 KB, the spindle capability, and a cutter material. The right-hand pane is the explorer's text
|
|
editor, waiting on a file to be given to it.</p>
|
|
<p><img src="projects-img/project-folder.en.png" alt="The File Explorer showing the open project's folder under the Project root: the folders MachineTool, NC and Output above five files with their sizes, among them the project file at 135.2 KB and four side files named for a cutting parameter set, a workpiece material, a spindle capability and a cutter material, with the empty text editor pane on the right"></p>
|
|
<div class="WARNING">
|
|
<h5>Warning</h5>
|
|
<p><strong>A Save As into a new folder can produce a project that finds none of its programs.</strong> Save As
|
|
writes out every side file the project file holds as a reference, into the new folder and at the
|
|
same relative place, and nothing it does not. What it leaves behind is whatever the project names
|
|
as a plain path instead of as a reference — and the NC programs a mission plays are named that
|
|
way. Nothing rewrites those paths either, so the saved project still asks for <code>NC/…</code>, now
|
|
underneath the new folder, where nothing has put it. The programs have to be brought across by
|
|
hand, or the Save As aimed at a folder that already holds them.</p>
|
|
</div>
|
|
<p>The folder a run writes its output into is named the same way, and it is not a dependency of the same
|
|
kind: nothing has to put it there, because the writers create it on demand under the folder the open
|
|
project was read from. A Save As does not move it — a run still writes beside the folder the project
|
|
came from, until that project is opened at its new path.</p>
|
|
<h2 id="what-a-project-change-does-to-the-rest-of-the-window">What a project change does to the rest of the window</h2>
|
|
<p>What decides a rebuild is the path changing, not the entry chosen. New, a Load that picks a different
|
|
project, Close Project and a Save As to a location other than the one already open all change it,
|
|
and each throws away every screen the browser has built and rebuilds against whatever the project is
|
|
afterwards — which is what stops one screen showing values from a project that is not open any more.
|
|
ReLoad always rebuilds as well, being the entry meant for re-reading the same path. A Load that
|
|
picks the project already open rebuilds nothing: the file is read again on the service, but the
|
|
screens keep what they were showing. <a href="the-app-window.html">The Application Window</a> states the same
|
|
rule from the frame's side, and covers what a rebuild costs a screen carrying unsaved state.</p>
|
|
<p>How far a change travels beyond the browser that made it is not the same for every entry. The three
|
|
that change which project the service holds open are announced to every browser connected to it, so
|
|
all of them follow. ReLoad
|
|
re-reads the same path: the browser that asked for it rebuilds, while a second browser — whose path
|
|
did not change — carries on with what it was showing.</p>
|
|
<p><strong>Save As announces nothing at all.</strong> The service moves onto the new path, and only the browser that
|
|
performed the Save As is told, in the reply to its own request. Every other browser goes on
|
|
displaying the old path in its <strong>Project</strong> dropdown, although the service is working with the new one
|
|
underneath — so a Save from any of them writes to the new path. A stale row corrects itself the next
|
|
time the service reports its state to that browser: a reload, another project change, or a run being
|
|
started, paused, finished or reset from any browser.</p>
|
|
<p>New, Load, ReLoad, Save and Save As take a turn each. A second one asked for while the first is still
|
|
running is refused rather than queued, and the refusal arrives as a warning reading <em>Another project
|
|
operation is in progress. Please try again.</em> Close Project takes no part in that turn-taking: it
|
|
neither waits for a running operation nor holds one off, and it never raises the warning.</p>
|
|
<h2 id="losing-work">Losing work</h2>
|
|
<p>Nothing keeps track of whether the open project has unsaved changes. No marker in the menu bar or in
|
|
the path row says the project has been edited, there is no prompt in front of <strong>ReLoad</strong> or <strong>Close
|
|
Project</strong>, and nothing at all stands in the way of a browser tab being closed or reloaded. Both
|
|
ReLoad and Close Project discard what the service is holding and has not written, in silence and at
|
|
once; a <strong>Save</strong> beforehand is the only thing that keeps it.</p>
|
|
<p><strong>Save As</strong> asks nothing either. Its dialog opens on the open project's own folder with the open
|
|
project's own file name already filled in, and nothing checks whether a file is already at the path
|
|
chosen: confirming writes over whatever is there. Confirming on the name as it arrives therefore
|
|
overwrites the project that is open — which is harmless, being what Save does — but the same
|
|
confirmation one folder away overwrites a different project just as quietly. <strong>New</strong> is the one entry
|
|
that refuses: it will not create a project where a file already exists, and reports that as an error
|
|
whose message can carry the location in full.</p>
|
|
<h2 id="before-one-is-built">Before one is built</h2>
|
|
<p>The data to collect from the machine owner before a project can be built is a checklist of its own:
|
|
<a class="xref" href="../../workflows/project-data-checklist.html">Project Data Checklist</a>. The order the pieces then go together in
|
|
is <a href="../../workflows/project-construction.html">Project Construction</a>.</p>
|
|
<h2 id="see-also">See Also</h2>
|
|
<ul>
|
|
<li><a href="index.html">Basics</a> — the rest of what is true on every screen</li>
|
|
<li><a href="the-app-window.html">The Application Window</a> — the menu bar this dropdown sits on, and the page rebuild a project change triggers</li>
|
|
<li><a href="finding-your-way.html">Finding Your Way</a> — the screens a project change rebuilds, and what happens to a selection in one</li>
|
|
<li><a href="messages-and-logs.html">Messages and Logs</a> — the footer's background zone and the toasts a project action raises, and where they can be read afterwards</li>
|
|
<li><a href="../utilities/file-explorer.html">File Explorer</a> — the browser these entries open as a picker, and the Project root that is this folder</li>
|
|
<li><a href="../run/a-mission-that-resumes.html">A Mission That Resumes</a> — what a project's folder has to hold for a run to restart where the last one stopped</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>
|