PcdmisObjectModel 21.1.0
dotnet add package PcdmisObjectModel --version 21.1.0
NuGet\Install-Package PcdmisObjectModel -Version 21.1.0
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="PcdmisObjectModel" Version="21.1.0" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="PcdmisObjectModel" Version="21.1.0" />
<PackageReference Include="PcdmisObjectModel" />
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add PcdmisObjectModel --version 21.1.0
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: PcdmisObjectModel, 21.1.0"
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package PcdmisObjectModel@21.1.0
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=PcdmisObjectModel&version=21.1.0
#tool nuget:?package=PcdmisObjectModel&version=21.1.0
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
PcdmisObjectModel
A COM-free object model and automation facade over PC-DMIS (PCDLRN). It lets .NET applications read, edit, write back, and execute PC-DMIS part programs through a strongly typed model and a clean async API, without ever touching a COM type directly.
Requirements
- .NET Framework 4.8
- x64 only — PC-DMIS COM is 64-bit, so consuming projects must run as x64.
- A registered PC-DMIS installation on the machine at runtime. The PCDLRN COM interop types are embedded into this assembly, but the actual implementation is provided by the installed PC-DMIS application.
Installation
Install-Package PcdmisObjectModel
Newtonsoft.Json is pulled in automatically as a dependency.
What's inside
MeasurementRoutine— a strongly typed model of a part program: metadata plus anElementscollection of commands (features, alignments, dimensions, moves, scans, parameter changes, flow control, reports, and more).PcdmisAutomationSession— a COM-free facade over the running PC-DMIS instance, with both synchronous and*Asyncmethods. All COM calls are funnelled onto a dedicated STA worker thread, so UI threads never block and connection-point events are delivered correctly.- JSON serialization —
RoutineJsonSerializer(andMeasurementRoutine.ToJson / SaveToJson / FromJson / LoadFromJson) preserve the polymorphic command tree so a routine can be stored and reloaded offline. - Application events — COM-free .NET events such as
PartProgramOpened/Closed/Saved,ProgramExecutionStarting/Ended,MachineConnected/Disconnecting, andStatusMessageUpdated.
Quick start
using PcdmisObjectModel;
var session = new PcdmisAutomationSession();
// Connect to a running PC-DMIS instance.
string error = await session.ConnectAsync();
if (error != null) { /* handle connection failure */ }
// Surface PC-DMIS status messages.
session.StatusMessageUpdated += (s, e) => Console.WriteLine(e.Message);
// Load the active part program into a strongly typed routine.
RoutineResult result = await session.LoadActiveRoutineAsync();
if (result.Success)
{
MeasurementRoutine routine = result.Routine;
foreach (var element in routine.Elements)
Console.WriteLine($"{element.ID} ({element.GetType().Name})");
// Persist offline as JSON.
routine.SaveToJson(@"C:\temp\routine.json");
// Push edits back into the active part program (replaces its commands).
await session.SyncRoutineToActiveProgramAsync(routine);
// Save the active program in place.
await session.SaveActiveRoutineAsync();
}
Notes
SyncRoutineToActiveProgramreplaces the commands in the active part program with the routine's elements and leaves the program open (not saved). CallSaveActiveRoutineto persist.- Executing a routine drives real machine motion when PC-DMIS is connected to a CMM. Make sure the correct part is loaded and the path is clear.
License / Author
Author: WU Dimin
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET Framework | net48 is compatible. net481 was computed. |
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
-
.NETFramework 4.8
- Newtonsoft.Json (>= 13.0.3)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 21.1.0 | 154 | 6/23/2026 |