• Share
  • Email
  • Embed
  • Like
  • Save
  • Private Content
Solid Edge API: Lightweight API's
 

Solid Edge API: Lightweight API's

on

  • 2,048 views

Solid Edge API: Lightweight API's

Solid Edge API: Lightweight API's

Statistics

Views

Total Views
2,048
Views on SlideShare
1,985
Embed Views
63

Actions

Likes
1
Downloads
56
Comments
0

2 Embeds 63

http://community.plm.automation.siemens.com 46
http://community-stage.plm.automation.siemens.com 17

Accessibility

Categories

Upload Details

Uploaded via as Microsoft PowerPoint

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment

    Solid Edge API: Lightweight API's Solid Edge API: Lightweight API's Presentation Transcript

    • Solid Edge Light-Weight APIsMadison MinerSoftware EngineerEDA, Inc. #SEU12
    • Presenter background• EDA has been an automation consultant for over 21 years.• Madison has been a software engineer @ EDA for 9 years.• EDA has experience automating Solid Edge, SolidWorks, AutoCAD, Google SketchUp, MS Office and more.• EDA has automated quoting, drafting, design, engineering and manufacturing. © Siemens AG 2012. All Rights Reserved.Page 2 Siemens PLM Software
    • Solid Edge Light-Weight APIsPresentation Outline:• What are the benefit of light-weight APIs?• Revision Maker – Overview and code samples • Show all file properties, linked files• File Properties – Overview and code samples • Show all file properties• SE Readers – Overview and code samples • Show all linked files © Siemens AG 2012. All Rights Reserved.Page 3 Siemens PLM Software
    • Reasons to use light-weight APIsNo Solid Edge required!• Light-weight APIs may be used on computers that do not have Solid Edge installed.Faster execution with less resources required.• Light-weight APIs load much faster and use much less computer resources that Solid Edge.Problem Solving• Sometimes you have to use the light-weight APIs to track down problems. © Siemens AG 2012. All Rights Reserved. Page 4 Siemens PLM Software
    • Revision Manager API • The RevisionManager type library is used to automate the Revision Manager application. • Common uses include moving, renaming and replacing files. • For example, EDA’s Revision Maker: • Allows users to move assemblies and all their linked parts from one folder to another without worrying about broken links or missing parts in the new location. www.edainc.net/RevisionMaker.aspx • The following sample console application will move an assembly and all linked documents to a new folder. © Siemens AG 2012. All Rights Reserved.Page 5 Siemens PLM Software
    • RevisionManager Sample Program MoveDocumentsYou will need to add a reference to the Solid Edge Revision Manager ObjectLibrary to access the API. © Siemens AG 2012. All Rights Reserved.Page 6 Siemens PLM Software
    • RevisionManager Sample Program MoveDocumentsAt the start of the file you will find a program summary. © Siemens AG 2012. All Rights Reserved. Page 7 Siemens PLM Software
    • RevisionManager Sample Program MoveDocumentsCollect and validate the parameters passed to the program: © Siemens AG 2012. All Rights Reserved.Page 8 Siemens PLM Software
    • RevisionManager Sample Program MoveDocumentsOpen the file with Revision Manager, call recursive move function, clean up. © Siemens AG 2012. All Rights Reserved.Page 9 Siemens PLM Software
    • RevisionManager Sample Program MoveDocumentsRecursive MoveDocAndAllLinkedFiles routine, part 1 © Siemens AG 2012. All Rights Reserved.Page 10 Siemens PLM Software
    • RevisionManager Sample Program MoveDocumentsRecursive MoveDocAndAllLinkedFiles routine, part 2 © Siemens AG 2012. All Rights Reserved.Page 11 Siemens PLM Software
    • RevisionManager Sample Program MoveDocumentsSample program usage: © Siemens AG 2012. All Rights Reserved.Page 12 Siemens PLM Software
    • FileProperties API • The FileProperties type library is used to view, edit and add properties to Solid Edge documents. • The following sample console application will enumerate all the properties of a Solid Edge document. • This sample program uses some of the code from the File Properties sample API program in the Solid Edge .NET Programmers Guide © Siemens AG 2012. All Rights Reserved.Page 13 Siemens PLM Software
    • FileProperties_EnumerateAllPropertiesGet, validate and open the file we are working with: © Siemens AG 2012. All Rights Reserved.Page 14 Siemens PLM Software
    • FileProperties_EnumerateAllPropertiesLoop through each property in each property set: © Siemens AG 2012. All Rights Reserved.Page 15 Siemens PLM Software
    • FileProperties_EnumerateAllPropertiesSample program output: © Siemens AG 2012. All Rights Reserved.Page 16 Siemens PLM Software
    • FileProperties_EnumerateAllPropertiesHow to access a specific PropertySet or Property: © Siemens AG 2012. All Rights Reserved.Page 17 Siemens PLM Software
    • SEReaders – DraftDataAPI, SEFacet, SEReader • The SEReaders are used to view the properties of Solid Edge Documents • Assemblies – SEReader.dll • Drafts – DraftDataAPI.dll • Parts – SEFacet.dll • Does not require Solid Edge to be installed to use • Must register the .dlls using regsvr32 before using. • Cannot be used to modify files, SEReaders APIs are read-only. • Sample programs: • SEReader_EnumerateLinkedComponents • SEFacet_Enumerator © Siemens AG 2012. All Rights Reserved.Page 18 Siemens PLM Software
    • All SE Readers require you to register dll and add areference.Find the DLL you want to use in :<ProgramFolder>Solid Edge ST4SDKReadersRegister it and then add as a reference. © Siemens AG 2012. All Rights Reserved.Page 19 Siemens PLM Software
    • SEReader_EnumerateLinkedComponentsThanks to Greg Chasteen for providing this sample program.• Windows Form program• Allows users to select an assembly• Enumerates all properties available through SEReader• Outputs FileName and OccName to a ListBox• Program was developed to find broken links © Siemens AG 2012. All Rights Reserved.Page 20 Siemens PLM Software
    • SEReader_EnumerateLinkedComponents © Siemens AG 2012. All Rights Reserved.Page 21 Siemens PLM Software
    • SEReader_EnumerateLinkedComponents © Siemens AG 2012. All Rights Reserved.Page 22 Siemens PLM Software
    • SEReader_EnumerateLinkedComponentsAvailable Properties• Matrix • 3D Transformation Matrix• Range • Extents (or Range) of the object• Quantity • Returns the number of occurrences of the referenced object• OccurrenceName • The file name followed by “:occurrence number” • objAttachment.OccurrenceName "CLAMP-JIC-ASSY.asm:8" © Siemens AG 2012. All Rights Reserved.Page 23 Siemens PLM Software
    • SEReader_EnumerateLinkedComponentsAvailable Properties• OccurrenceProps - Enum• OccurrenceExtendedProps- Enum © Siemens AG 2012. All Rights Reserved.Page 24 Siemens PLM Software
    • SEFacet.dll• The SEFacet.dll provides information about the Bodies, Faces and Strips in a part.• This API could be used to create: • A 3D part viewer • A program that can compare files • Other Ideas? © Siemens AG 2012. All Rights Reserved.Page 25 Siemens PLM Software
    • SEFacet_EnumeratorSome of this code can be found in the SEFacet documentation:<Programs Directory>Solid Edge ST4SDKReadersSEFacet.doc• Command line program• Allows users to pass a Solid Edge Part as an argument• Lists all Face information in the part, including Style info © Siemens AG 2012. All Rights Reserved.Page 26 Siemens PLM Software
    • SEFacet_Enumerator © Siemens AG 2012. All Rights Reserved.Page 27 Siemens PLM Software
    • SEFacet_Enumerator © Siemens AG 2012. All Rights Reserved.Page 28 Siemens PLM Software
    • Solid Edge Light-Weight APIsThank You!Questions?madison@edainc.netwww.edainc.net #SEU12