AutoCAD Map 3D Developer
Welcome to Autodesk’s AutoCAD Map 3D Developer Forums. Share your knowledge, ask questions, and explore popular AutoCAD Map 3D Developer topics.
abbrechen
Suchergebnisse werden angezeigt für 
Anzeigen  nur  | Stattdessen suchen nach 
Meintest du: 

Connect Autocad to Smartsheet using c#

0 ANTWORTEN 0
Antworten
Nachricht 1 von 1
dwattersQJ39E
133 Aufrufe, 0 Antworten

Connect Autocad to Smartsheet using c#

Hello, 

I am attempting to connect to a smartsheet using their API in a C# program for autocad / autocadMap3d. 
i am getting the error : "could not load file or assembly 'smartsheet-csharp-sdk' or one of its dependencies. 

System.IO.FileNotFoundException: Could not load file or assembly 'smartsheet-csharp-sdk, Version=5.0.0.0, Culture=neutral, PublicKeyToken=null' or one of its dependencies. The system cannot find the file specified.
File name: 'smartsheet-csharp-sdk, Version=5.0.0.0, Culture=neutral, PublicKeyToken=null'

Looking for anyone who has had experience with smartsheets or trying to link other APIs in an autocad program. 

        public static void InitializeSmartsheetClient()
        {
            Document doc = Application.DocumentManager.MdiActiveDocument;
            Database db = doc.Database;
            Editor ed = doc.Editor;

            string smartsheetAccessToken = ""; // token
            long specificSheetId = ;  // Smartsheet Tracker 


            try
            {

                // Initialize Smartsheet client with the API access token using SmartsheetBuilder
                var smartsheetClient = new SmartsheetBuilder()
                                 .SetAccessToken(smartsheetAccessToken)
                                 .Build(); // This initializes the SmartsheetClient

                // Retrieve the sheet by its ID from Smartsheet
                var sheet = smartsheetClient.SheetResources.GetSheet(specificSheetId, null, null);  // Retrieve the sheet by ID

                // If the sheet is retrieved successfully, display the sheet name
                ed.WriteMessage($"\nConnected to Smartsheet! Sheet Name: {sheet.Name}\n");
            }
            catch (System.Exception ex)
            {
                // If there’s an error connecting to Smartsheet, display the error message
                ed.WriteMessage($"\nError connecting to Smartsheet: {ex.Message}\n");
            }
        }

 

 

0 ANTWORTEN 0

Sie finden nicht, was Sie suchen? Fragen Sie die Community oder teilen Sie Ihr Wissen mit anderen.

In Foren veröffentlichen  

Autodesk Design & Make Report