Automate TS with visual C++

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

Moderators: remi77, jacs, Daniel

L
Private
Private
Posts: 1
Joined: Tue Apr 08, 2008 4:30 am
Location: Shenzhen
Contact:

Automate TS with visual C++

Unread post by L »

Hi guys,

I failed to automate TopSolid with both visual c++ 6.0 and visual c++ 2005. The problem is wheneve I invoke any method or property of the IDocument object a "Member not found" exception is fired. It seems that I did not retrieve the IDocument object properly(see codes below). Any idea about it?

Code: Select all

IApplication app;
IDocuments docs;
IDocumentDesign doc;

app.CreateDispatch("TopSolid.Application");
app.SetVisible(TRUE);
docs.AttachDispatch(app.GetDocuments());
doc.AttachDispatch(docs.Add("top")); 
  // a design document created here successfully

CString msg;
msg.Format("Version No.: %d", app.GetVersion());
AfxMessageBox(msg);
  // ok the version number is correct

msg.Format("Current document count is %d", docs.GetCount());
AfxMessageBox(msg); // yes it's alright

doc.GetCurves();
  // or any other method or property, "Member not found" error here
Holzknoten
Master Corporal
Master Corporal
Posts: 43
Joined: Fri Apr 29, 2011 7:16 am
TopSolid Module: TopSolid'Wood
TopSolid Version: 6.17
Location: Hannover
Contact:

Unread post by Holzknoten »

Your post is 3 years old and you got no answer.

whats up with the TopSolid user/support ?

i am sorry i can't help you. My knowledge of C++ is to small.
by Holzknoten
Post Reply