Archive for the ‘Code Examples’ Category


Download straitPortal code examples for ENOVIA SmarTeam

Tom van Oost @ 9:09 AM on March 18, 2011

The following zip file contains a set of straitPortal code examples: http://blog.straitportal.com/wp-content/uploads/straitPortal-code-examples.zip

The code examples show you how-to create ENOVIA SmarTeam applications directly on the straitPortal platform. All code examples are based on the Microsoft .NET platform.

More >>

.NET Code Example: HelloWorld application

Tom van Oost @ 1:21 PM on May 17, 2010

The following code example shows how simple it is to create your first straitPortal app. It shows howto get a list of users from the PLM system.
HelloWorld.vb
Imports Infostrait.Generic.StraitWeb.Shared
Module [Module]
Sub Main()
Console.WriteLine(”My first straitPortal Application.”)
Console.WriteLine(”Connecting…”)
Dim query As SimpleDataRetrieveDefinition
query = New SimpleDataRetrieveDefinition()
query.Class.ClassName = “Users”
query.Attributes.Add(New Attribute(”LOGIN”))
Try
Dim result As DataSet
result = LibraryFactory.GetLibrary(My.Settings.DefaultServiceUrl).Query(query).ConvertToDataSet()
Console.WriteLine(”Listing PLM users: “)
If result.Tables.Count > 0 Then
For Each [...]

More >>

.NET Code Example: Retrieving hierarchical related objects

Tom van Oost @ 11:00 AM on January 25, 2010

The .NET following code example shows howto retrieve child items from a specific item in ENOVIA SmarTeam, using the straitPortal API. Use this example as a template to retrieve other hierarchical related information from ENOVIA SmarTeam.
Retrieve item children
‘ Create a new data retrieve definition to retrieve child objects
Dim definition As ExtendedDataRetrieveDefinition = New ExtendedDataRetrieveDefinition
Dim c [...]

More >>