GetOperations

All topics about specific development with COM interface, LIP language, API in VB, ...

Moderators: remi77, jacs, Daniel

Post Reply
cam
Master Corporal
Master Corporal
Posts: 37
Joined: Fri Oct 02, 2009 9:46 am
TopSolid Module: TopSolid'Cam
TopSolid Version: 7.7
Location: Germany

GetOperations

Post by cam » Thu Jul 13, 2017 11:57 am

Hi,

I get a "System.NullReferenceException" on

List<ElementId> ops = TopSolidCamHost.Operations.GetOperations(docID);

The docID is correct.
Greetings
Chris

cam
Master Corporal
Master Corporal
Posts: 37
Joined: Fri Oct 02, 2009 9:46 am
TopSolid Module: TopSolid'Cam
TopSolid Version: 7.7
Location: Germany

Re: GetOperations

Post by cam » Mon Sep 11, 2017 11:39 am

No one an idee ????


This is my part of code, that doesn't work. It allways jump into "catch"

if (!TopSolidHost.Application.StartModification("My Action", false)) return;
try
{
TopSolidHost.Documents.EnsureIsDirty(ref docID);
if (TopSolidCamHost.Documents.IsCam(docID))
{
List<ElementId> ops = TopSolidCamHost.Operations.GetOperations(docID);
}
TopSolidHost.Application.EndModification(true, true);
}
catch
{
TopSolidHost.Application.EndModification(false, false);
MessageBox.Show("TopSolid modification READ failure", "WorkshopDocs -- Fehler", MessageBoxButtons.OK, MessageBoxIcon.Asterisk, MessageBoxDefaultButton.Button1, MessageBoxOptions.DefaultDesktopOnly);
}
Greetings
Chris

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest