<?xml encoding=”UTF-8″>By Madhukar Moogala
Microsoft deprecated WCF with the release of .NET 5 and recommends developers transition to more modern technologies. This can be a challenge for those with existing WCF applications who want to migrate to .NET 8.0.
Recently, I received a question about integrating gRPC.NET, a popular modern alternative to WCF, with AutoCAD 2025.
In response, I’ve created a small application that demonstrates how to interact with a gRPC server from an AutoCAD client.
This sample provides a starting point for developers interested in exploring this integration approach.
The provided code showcases a basic example using a GreeterService.
Let’s break it down:
- Client-Side (AutoCAD Plugin):
- The
TestGrpcmethod establishes a gRPC channel to a server running onlocalhost:8080. - It creates a
GreeterClientobject to interact with the gRPC service. - An asynchronous
SayHelloAsynccall is made, sending aHelloRequestmessage with the name “GreeterClient”. - The response (
HelloReply) containing the server’s greeting is received and written to the active AutoCAD document.
- The
-
gRPC Service Definition (Protobuf):
- Defines a
Greeterservice with aSayHelloRPC method. - Clients send a
HelloRequestmessage with their name. - The server responds with a
HelloReplycontaining a greeting.
- Defines a
-
Server-Side:
- Exposes the
GreeterServiceas a gRPC service. - The
SayHellomethod receives aHelloRequest, extracts the name, and constructs a personalized greeting in theHelloReplymessage.
- Exposes the
Running the Application
This code creates a combined gRPC and HTTP server. Clients can use gRPC to interact with the GreeterService, while a basic HTTP endpoint provides a simple test or informational message.
Source Code : https://github.com/MadhukarMoogala/GrpcToAcad/blob/main/README.md

Leave a Reply