Solid Edge Developer Day: Managed Automation

16
Unrestricted © Siemens AG 2013 All rights reserved. 4 th Generation VLC courtesy of Edison2 #SEU13 Managed Automation Greg Chasteen, Siemens PLM Software

description

In this session we will give a walkthrough of a program that will demonstrate usage of the following API’s: Solid Edge Embedded Client Related API’s, Check out and download Documents from Server, Revise to Team Center, Save as to Teamcenter, CheckIn documents to Team Center Server, Get Item revision, Get List of files from Tc Server

Transcript of Solid Edge Developer Day: Managed Automation

Page 1: Solid Edge Developer Day: Managed Automation

Unrestricted © Siemens AG 2013 All rights reserved.

4th Generation VLCcourtesy of Edison2

#SEU13

Managed AutomationGreg Chasteen, Siemens PLM Software

Page 2: Solid Edge Developer Day: Managed Automation

Unrestricted © Siemens AG 2013 All rights reserved.

Page 2 Siemens PLM Software

Working With PDM Managed Documents

Each Solid Edge PDM client provides an API

• Insight• Will provide documented examples

• Solid Edge Embedded Client ( SEEC)• Will provide documented examples

• Solid Edge for Sharepoint (SESP)• Will provide documented examples

Page 3: Solid Edge Developer Day: Managed Automation

Unrestricted © Siemens AG 2013 All rights reserved.

Page 3 Siemens PLM Software

Insight API’s

All Solid Edge API commands are “INSIGHT” enabled• File Open (both interactive command and API) accepts either url or folder

based name, cache, etc.• Revision Manager.Open will automatically check-out a file managed by Insight.

There is an INSIGHT automation layer to directly access/execute INSIGHT server specific commands such as download/upload/check-in/check-out etc.

Insight API’s available on both Revision Manager and Solid Edge Framework object models

Page 4: Solid Edge Developer Day: Managed Automation

Unrestricted © Siemens AG 2013 All rights reserved.

Page 4 Siemens PLM Software

Insight API’s

Let’s take a look at the Insight API’s

Page 5: Solid Edge Developer Day: Managed Automation

Unrestricted © Siemens AG 2013 All rights reserved.

Page 5 Siemens PLM Software

Insight API’s

Document containing details on each API

• USB drive provided Advanced Track\Reference Material\InsightExamples.doc

DisplayAlert will suppress all authentication dialogs as well as the Edit Profile dialog.

Page 6: Solid Edge Developer Day: Managed Automation

Unrestricted © Siemens AG 2013 All rights reserved.

Page 6 Siemens PLM Software

SESP and SEEC APIs

• Very similar design. In fact, whenever possible and exact duplicate

• Access to APIs via SolidEdgeFramework type library• SEEC – SolidEdgeTCE• SESP – SolidEdgeInsightXT

• Let’s take a look at them via object browser

Page 7: Solid Edge Developer Day: Managed Automation

Unrestricted © Siemens AG 2013 All rights reserved.

Page 7 Siemens PLM Software

SESP and SEEC APIs…. Some differences

ValidateLogin

Purpose:This API is used to authenticate the user before calling any others SEEC functions.

Syntax: Call ObjSEEC.ValidateLogin( UserName, Password, Group, Role,URL)

Parameters:

UserName (Input): Specifies the UserName of the user to authenticate

Password (Input): Specifies the password of the user to authenticate

Group (Input): Specifies the group to which the user belongs. The default group is “dba”

Url (Input) : Specifies the TC database. Can be 2 Tier or 4 Tier

Note: The behavior of the authentication process depends on the display_alerts flag. If the value of the flag is OFF, then Validatelogin () method internally silently (i.e. without showing any Login dialog) does Auto login using supplied credentials.

Page 8: Solid Edge Developer Day: Managed Automation

Unrestricted © Siemens AG 2013 All rights reserved.

Page 8 Siemens PLM Software

Example logging into SEEC

Page 9: Solid Edge Developer Day: Managed Automation

Unrestricted © Siemens AG 2013 All rights reserved.

Page 9 Siemens PLM Software

SESP and SEEC APIs…. Some differences

API Name: ValidateLoginPurpose:This API is used to login into SESP.Note:The API actually uses to log in to the SESP.The behavior of the authentication process depends on the display_alerts flag. If the display_alerts flag is ON then user will see the Auto-Login dialog (for the login purpose) where he can do AutoLogin or he can directly type in his UserName and password to authenticate him. If the user provides the wrong information then the value of the hr will return as S_FALSE.If the value of the flag is OFF, then Validatelogin () method will use the username/password that is supplied, to login into SESP. But this time, no login dialog will be shown and the login will be done silently.

Page 10: Solid Edge Developer Day: Managed Automation

Unrestricted © Siemens AG 2013 All rights reserved.

Page 10 Siemens PLM Software

SESP and SEEC APIs

Notice there was not an Open API…Slightly different approach than the Insight API’s with regards to C-O\Open, C-I\Close

• The Documents.Open API does not take input directly from the TC database• The document needed must already exist in the SEEC cache

• At this point the Documents.Open from the SEEC cache

strFileNameToCheckout is the file from the SEEC cache !

Page 11: Solid Edge Developer Day: Managed Automation

Unrestricted © Siemens AG 2013 All rights reserved.

Page 11 Siemens PLM Software

Example for SESP

Demo code working!

Page 12: Solid Edge Developer Day: Managed Automation

Unrestricted © Siemens AG 2013 All rights reserved.

Page 12 Siemens PLM Software

SEEC API’s

Create a new document and save to the databaseAlways import it with the ImportDocumentsToServer API

OR

Page 13: Solid Edge Developer Day: Managed Automation

Unrestricted © Siemens AG 2013 All rights reserved.

Page 13 Siemens PLM Software

SESP API’s

Create a new document and save to the databaseImport it with the ImportDocumentsToServer API

Demo code working!

Page 14: Solid Edge Developer Day: Managed Automation

Unrestricted © Siemens AG 2013 All rights reserved.

Page 14 Siemens PLM Software

More SEEC API’s

Document containing details on each API

• USB drive provided Advanced Track\Reference Material\ Files\TeamCenter Automation APIs.doc

Page 15: Solid Edge Developer Day: Managed Automation

Unrestricted © Siemens AG 2013 All rights reserved.

Page 15 Siemens PLM Software

More SESP API’s

Document containing details on each API

• USB drive provided Advanced Track\Reference Material\ Files\Solid Edge for Sharepoint Automation APIs.doc

Page 16: Solid Edge Developer Day: Managed Automation

Unrestricted © Siemens AG 2013 All rights reserved.

Page 16 Siemens PLM Software

Let’s look at some more Sample Code!

USB drive provided

Advanced Track\Programs\SEEC Package Complete Design\SEEC Package Complete Design.sln

Advanced Track\Programs\SEECUtilities\SEECUtilities.sln