GetOperations

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

Moderators: remi77, jacs, Daniel

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

GetOperations

Unread post by cam »

Hi,

I get a "System.NullReferenceException" on

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

The docID is correct.

(Don't forget to Connect() to TopSolidCamHost.......)
Last edited by cam on Mon Aug 06, 2018 10:17 am, edited 2 times in total.
Greetings
Chris
cam
Master Corporal
Master Corporal
Posts: 39
Joined: Fri Oct 02, 2009 9:46 am
TopSolid Module: TopSolid'Cam
TopSolid Version: 7.8
Location: Germany

Re: GetOperations

Unread post by cam »

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