Solid Edge Viewer - how to CreateObject("Solid Edge Viewer.Application")

 

Hello,

I would like to use a SE COM without installing a full SE.

With full SE I can do that (example from programming manual):

Set objApp = CreateObject("SolidEdge.Application")

objApp.Visible = True

Set objDocs = objApp.Documents

and it works, but with viewer SE I don't know what should I use instead of "SolidEdge.Application"

In one of the threads Jason Newell wrote:

"Solid Edge has 2 viewers, a 3D viewer and a 2D viewer. You can find the CLSID's in the following registry paths.

 

HKEY_CLASSES_ROOT\SEPARTX.SEpartXCtrl.1\CLSID

HKEY_CLASSES_ROOT\SEDRAFTX.SEDraftXCtrl.1\CLSID"

then I try:

Set objApp = CreateObject("SEpartXCtrl.1")

objApp.Visible = True

Set objDocs = objApp.Documents

I can CreateObject("SEpartXCtrl.1"), but next I get error message "Method 'Documents' not supported by automation object".

Is it possible to use Viewer in the same way as SE when I use COM technology ?

kind regards

ZS

 

Posted by: Zbigniew Sorokowski
Post date: 10/6/2008 10:50:38 PM

3 REPLIES

RE: Solid Edge Viewer - how to CreateObject("Solid Edge Viewer.Application")

Hello,

 

no wrong approach. The .SEpartXCtrl.1 and .SEDraftXCtrl.1 are COM controls. You have to open VisualStudio create a Form App, goto the designer view, and right click on the ToolBox (Where your Windows Forms objects are i.e. labels, buttons) and click on "Choose items..." goto the tab "COM Components", click on Browse and select the files : SEDraft.ocx and SEPartX.ocx.

Click OK. Now, those two selected components will appear in the ToolBox. Just Drag&Drop them onto you form. That's it.

regards,

Sibi

 

 

Posted by: Seb Sosna
Post date: 10/7/2008 10:27:28 PM

RE: Solid Edge Viewer - how to CreateObject("Solid Edge Viewer.Application")

 

thank you for your answer,

I did as you said (I use VB 2008 instead of VisualStudio), and now I have object AxSEpartX1.

I open a par or asm file in the viewer (AxSEpartX1.PartFile = 'file.asm') which I put on my form.

And then I would like to get access to Documents collection. How to do that ?

I can't do

Set objDocs = AxSEpartX1.Documents (as I can do for full SE -> Set objDocs = objApp.Documents)

because documents is not a member of AxSEpartX1.

I don't see any method or properties which allowed me to obtain this information.

kind regards

ZS

 

Posted by: Zbigniew Sorokowski
Post date: 10/8/2008 12:39:52 AM

RE: Solid Edge Viewer - how to CreateObject("Solid Edge Viewer.Application")

 

It's totally different than the standard Solid Edge API.  You can use the Object Browser in VB.NET to see what properties \ methods are available.  It  will be very limited compared to what you get in the SolidEdgeFramework API.

 

Posted by: Jason Newell
Post date: 10/8/2008 7:56:03 AM