Download presentation
Presentation is loading. Please wait.
Published byDina Gregory Modified over 9 years ago
1
#SEU12 Solid Edge Light-Weight APIs Madison Miner Software Engineer EDA, Inc.
2
© Siemens AG 2012. All Rights Reserved. Siemens PLM Software Page 2 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.
3
© Siemens AG 2012. All Rights Reserved. Siemens PLM Software Page 3 Solid Edge Light-Weight APIs Presentation 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
4
© Siemens AG 2012. All Rights Reserved. Siemens PLM Software Page 4 Reasons to use light-weight APIs No 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.
5
© Siemens AG 2012. All Rights Reserved. Siemens PLM Software Page 5 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 www.edainc.net/RevisionMaker.aspx The following sample console application will move an assembly and all linked documents to a new folder.
6
© Siemens AG 2012. All Rights Reserved. Siemens PLM Software Page 6 RevisionManager Sample Program MoveDocuments You will need to add a reference to the Solid Edge Revision Manager Object Library to access the API.
7
© Siemens AG 2012. All Rights Reserved. Siemens PLM Software Page 7 RevisionManager Sample Program MoveDocuments At the start of the file you will find a program summary.
8
© Siemens AG 2012. All Rights Reserved. Siemens PLM Software Page 8 RevisionManager Sample Program MoveDocuments Collect and validate the parameters passed to the program:
9
© Siemens AG 2012. All Rights Reserved. Siemens PLM Software Page 9 RevisionManager Sample Program MoveDocuments Open the file with Revision Manager, call recursive move function, clean up.
10
© Siemens AG 2012. All Rights Reserved. Siemens PLM Software Page 10 RevisionManager Sample Program MoveDocuments Recursive MoveDocAndAllLinkedFiles routine, part 1
11
© Siemens AG 2012. All Rights Reserved. Siemens PLM Software Page 11 RevisionManager Sample Program MoveDocuments Recursive MoveDocAndAllLinkedFiles routine, part 2
12
© Siemens AG 2012. All Rights Reserved. Siemens PLM Software Page 12 RevisionManager Sample Program MoveDocuments Sample program usage:
13
© Siemens AG 2012. All Rights Reserved. Siemens PLM Software Page 13 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 GuideSolid Edge.NET Programmers Guide
14
© Siemens AG 2012. All Rights Reserved. Siemens PLM Software Page 14 FileProperties_EnumerateAllProperties Get, validate and open the file we are working with:
15
© Siemens AG 2012. All Rights Reserved. Siemens PLM Software Page 15 FileProperties_EnumerateAllProperties Loop through each property in each property set:
16
© Siemens AG 2012. All Rights Reserved. Siemens PLM Software Page 16 FileProperties_EnumerateAllProperties Sample program output:
17
© Siemens AG 2012. All Rights Reserved. Siemens PLM Software Page 17 FileProperties_EnumerateAllProperties How to access a specific PropertySet or Property:
18
© Siemens AG 2012. All Rights Reserved. Siemens PLM Software Page 18 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
19
© Siemens AG 2012. All Rights Reserved. Siemens PLM Software Page 19 All SE Readers require you to register dll and add a reference. Find the DLL you want to use in : \Solid Edge ST4\SDK\Readers Register it and then add as a reference.
20
© Siemens AG 2012. All Rights Reserved. Siemens PLM Software Page 20 SEReader_EnumerateLinkedComponents Thanks 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
21
© Siemens AG 2012. All Rights Reserved. Siemens PLM Software Page 21 SEReader_EnumerateLinkedComponents
22
© Siemens AG 2012. All Rights Reserved. Siemens PLM Software Page 22 SEReader_EnumerateLinkedComponents
23
© Siemens AG 2012. All Rights Reserved. Siemens PLM Software Page 23 SEReader_EnumerateLinkedComponents Available 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"
24
© Siemens AG 2012. All Rights Reserved. Siemens PLM Software Page 24 SEReader_EnumerateLinkedComponents Available Properties OccurrenceProps - Enum OccurrenceExtendedProps- Enum
25
© Siemens AG 2012. All Rights Reserved. Siemens PLM Software Page 25 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?
26
© Siemens AG 2012. All Rights Reserved. Siemens PLM Software Page 26 SEFacet_Enumerator Some of this code can be found in the SEFacet documentation: \Solid Edge ST4\SDK\Readers\SEFacet.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
27
© Siemens AG 2012. All Rights Reserved. Siemens PLM Software Page 27 SEFacet_Enumerator
28
© Siemens AG 2012. All Rights Reserved. Siemens PLM Software Page 28 SEFacet_Enumerator
29
#SEU12 Thank You! Questions? Solid Edge Light-Weight APIs madison@edainc.net www.edainc.net
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.