When SmarTeam Basic Scripts Are Not Enough: VB.NET Scripting for ENOVIA SmarTeam - PowerPoint PPT Presentation

Loading...

PPT – When SmarTeam Basic Scripts Are Not Enough: VB.NET Scripting for ENOVIA SmarTeam PowerPoint presentation | free to download - id: 6cf05e-ZmFhN



Loading


The Adobe Flash plugin is needed to view this content

Get the plugin now

View by Category
About This Presentation
Title:

When SmarTeam Basic Scripts Are Not Enough: VB.NET Scripting for ENOVIA SmarTeam

Description:

When SmarTeam Basic Scripts Are Not Enough: VB.NET Scripting for ENOVIA SmarTeam Marc Young xLM Solutions, LLC. Outline Scripting in SmarTeam Why? – PowerPoint PPT presentation

Number of Views:10
Avg rating:3.0/5.0
Date added: 27 November 2019
Slides: 26
Provided by: MarcY77
Learn more at: http://www.xlmsolutions.com
Category:

less

Write a Comment
User Comments (0)
Transcript and Presenter's Notes

Title: When SmarTeam Basic Scripts Are Not Enough: VB.NET Scripting for ENOVIA SmarTeam


1
When SmarTeam Basic Scripts Are Not Enough
VB.NET Scripting for ENOVIA SmarTeam
  • Marc Young
  • xLM Solutions, LLC.

2
Outline
  • Scripting in SmarTeam
  • Why? What? How?
  • Myths vs. Facts
  • SmarTeam Script Editor
  • Limitations
  • Example and Debugging
  • Microsoft Visual Studio
  • Advantages
  • Example and Debugging
  • ROI Analysis
  • Conclusions

3
Scripting in SmarTeam
  • Why?
  • Some processes are tedious to carry out in
    SmarTeam
  • Manual processing is prone to mistakes
  • Out-of-the-box functionalities do not meet
    business needs and requirements
  • Integrate with other applications and business
    systems
  • To demonstrate some cool stuff and features

4
Scripting in SmarTeam
  • What?
  • Bulk Loading Tools
  • Custom Part Numbers
  • Workflow Assignments
  • Special Notifications
  • Special Reports
  • etc.

5
Scripting in SmarTeam
  • How?
  • SmarTeam has provided a robust API
  • Can be developed in different programming
    languages (VB, VB.Net, C, C, ASP.NET)
  • Different Development Suites Script Editor,
    Visual Studio
  • Documentation
  • SDK - API Reference Guide, Samples
  • Server-Side_Hooks_for_Server-Based_Applications.pd
    f
  • Many SmarTeam tools and functionalities are
    implemented using this API
  • Community Workspace
  • PLM DB Tools
  • Search and Link
  • Create Folders
  • Upload Documents
  • Display Drawing from Items
  • etc.

6
I do not want or need to customize the system
  • Myths
  • Companies are hesitant to customize their
    SmarTeam installations for fear of
  • Problems with upgrades (compatibility issues)
  • Increased complexity
  • System becomes unsupported
  • Facts
  • Majority of SmarTeam customers have implemented
    customizations
  • APIs are largely compatible across versions
  • e.g., SmarTeam V5R12 scripts function properly in
    V5R20
  • Properly constructed scripts are easy to deploy
    and maintain
  • Scripts may be disabled to aid in troubleshooting
    and diagnostics
  • Scripts allow customers to harness the power of
    SmarTeam to develop and deploy optimized
    solutions for their enterprise PLM needs
  • Challenge
  • To balance customization versus out-of-the-box
    functionalities

7
SmarTeam Script Editor
  • Default SmarTeam Macro language tool
  • Based on Visual Basic 4.0 (gt 15 years old)
  • A third party tool from Summit Software
    (www.summsoft.com)
  • Suitable for developing simple SmarTeam
    customization scripts
  • Easy to deployput scripts in the shared SmarTeam
    script directory
  • C\Program Files\SMARTEAM\ConfigurationSettings\Da
    ta\Domain\smarteam.std.legacyPreferences.config.xm
    l
  • ltDirectory_Structure.ScriptDirectorygt\\ServerName\
    StScriptslt/Directory_Structure.ScriptDirectorygt
  • Script Editor Review

8
Script Editor Limitations
  • Inherent libraries and functions
  • Based on VB 4.0 released in 1995
  • Split function
  • String manipulation
  • Lists and complex data types
  • etc.
  • GUI features and functionalities
  • Debugging support
  • Poor Formatting
  • Indentation and case correction
  • Example Check for Duplicate

9
Microsoft Visual Studio MSDN
  • Visual Studio Editions
  • 2005/2008 Team System
  • 2005/2008 Professional
  • 2005/2008 Standard
  • 2005 Tools for Office
  • 2008 Express (VB, C, C)free
  • 2010 Editions
  • MSDN Subscription (Professional Premium)
  • 10.9 TB and 13,000 downloads
  • Windows Windows Servers
  • Toolkits, language tools, SDKs, driver
    development kits
  • All other server products
  • Microsoft Office products
  • Technical support incidents (2 or 4)

10
Advantages of Visual Studio .NET Framework
  • Programming languages include the easy-to-use
    Visual Basic and more structured languages like
    C and C
  • True object-oriented programming languages
  • Rich GUI and user experiences (e.g.,
    IntelliSense)
  • Integrated local and remote debugging
    capabilities with static code analysis improve
    code quality and reliability
  • Vast amount of resources and examples available
    on the web
  • Integrated web development and testing
    environment
  • Microsoft .NET Framework provides a large
    collection of classes and services that allows
    you to work more efficiently
  • SmarTeam Script/UDT Development
  • SmarTeam is currently a .NET 2.0 application
  • .NET 2.0 is the minimum supported runtime for
    UDTs
  • Visual Studio 2005 and 2008 can target the .NET
    2.0 environment

11
Visual Studio Example
12
Configuring the Project Environment
  • SmarTeam Primary Interop Assemblies (PIAs)
  • e.g., SmApplic, SmRecList, SmUtil
  • Copy assemblies from the Global Assembly Cache
    (GAC) to a local folder to make referencing
    easier
  • (Optional) Add the local folder to Visual
    Studios reference search path (HKLM\Software\Micr
    osoft\.NETFramework\AssemblyFolders on 32 bit
    windows)

13
Tips for Creating a Windows Customization
  • As SmarTeams scripting engine is COM-based, the
    user-defined library must also expose a COM
    interface
  • VB.NET provides a template for COM classes
  • C is a bit more involved but allows for finer
    control on what happens

14
VB.NET COM Class Template
15
(No Transcript)
16
Project References
  • Both Projects
  • SmarTeam.Std.Interop.SmarTeam.SmApplic
  • SmarTeam.Std.Interop.SmarTeam.SmRecList
  • Server Side Script DLL
  • SmarTeam.Std.Interop.SmarTeam.SmartServerHook
  • SmarTeam.Std.Interop.SmarTeam.SmartServerHookStd

17
Project References
  • Tip Change Copy Local and Specific Version to
    False
  • Makes it easier to recompile on newer versions of
    SmarTeam.

18
Tips for Creating a Windows Customization
  • Advanced Tip
  • By default in VS2005, all classes in current
    project are set to
  • ComVisibleTrue
  • Recommendation
  • Update the AssemblyInfo.vb (via the UI or direct
    editing) and set ComVisible to false
  • Explicitly expose the desired classes

19
(No Transcript)
20
Visual Studio Example Check For Duplicates
  • For a thick client, call the user defined .NET
    DLL from the script
  • Dim oDll As Object
  • Set oDll CreateObject("CheckForDuplicate.SmarTea
    mInterface")
  • Dim retcode As Integer
  • retcode oDll.checkForDuplicate(SmSession,FirstRe
    c,ThirdRec)
  • For Web Editor (Server-Side) Script, enter the
    following configuration setting
  • High level (simplest, and shown in the current
    example)
  • ltServerHooks.InitgtServerSideScripts.ServerSideDupl
    icateslt/ServerHooks.Initgt
  • Low Level (more involved)
  • ltServerHooks.CLSIDgt82F7EBD2-61D9-4CEB-8FD8-535EF3
    2DEB2Clt/ServerHooks.CLSIDgt

21
ROI for a Simple Script
  • Can we justify the investment?
  • Script development cost 5000.00
  • What are the time and cost savings of an
    automation solution versus developing a script?
  • 10 engineers
  • Engineer cost per hour 62.50
  • 10 minutes saving per engineer per day
  • 200 days in the year
  • Savings per engineer per day (62.5 x 1/6)
    10.42
  • Savings per engineer per year (10.42 x 200)
    2,083.33
  • Saving for 10 engineers per year 20,833.33
  • ROI in year 1 15,833.33 or a 316.67 return
  • Expand this to year 2, 3, 4, 5,

22
ROI Calculator
23
Script Implementation Considerations
  • Should you implement a script?
  • Are users repeatedly making the same mistakes?
  • Are certain processes tedious?
  • See Scripting in SmarTeam Why?
  • Define the functional criteria for the script
  • Define test cases
  • Build an environment for testing
  • To ensure script will not adversely affect
    production
  • Maintain detailed script description and
    instructions on how to hook into SmarTeam
  • Request source code or insure a way for
    maintaining the script

24
Conslusion
  • Scripting is a powerful and economical approach
    to expand and customize SmarTeam for enterprise
    PLM needs
  • Tools are readily available
  • SmarTeam Script Editor (included)
  • Microsoft Visual Studio (free versions available)
  • The cost savings and ROI can be tremendous (even
    for a 10-min process)

25
  • Thank You!

Questions?
Script example shown is available at
http//www.xlmsolutions.com
Marc Young xLM Solutions, LLC. 248-926-5932 myoung
_at_xlmsolutions.com
About PowerShow.com