Solid Edge Developer Day: Managed Automation
-
Upload
siemens-plm-software -
Category
Technology
-
view
687 -
download
4
description
Transcript of 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
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
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
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
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.
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
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.
Unrestricted © Siemens AG 2013 All rights reserved.
Page 8 Siemens PLM Software
Example logging into SEEC
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.
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 !
Unrestricted © Siemens AG 2013 All rights reserved.
Page 11 Siemens PLM Software
Example for SESP
Demo code working!
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
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!
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
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
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