Transcription of Solid Edge – Siemens PLM Software
1 Solid Edge Siemens PLM Software .NET Programmer s Guide Solid Edge with Synchronous Technology API 2 Introduction Table of Contents CHAPTER 1 - INTRODUCTION ---------------------------------------- --------------------------------- 8 Who Should Read This Book ---------------------------------------- ---------------------------------------- -------------------------------- 8 Visual Basic Users ---------------------------------------- ---------------------------------------- ---------------------------------------- - 8 Software Requirements ---------------------------------------- ---------------------------------------- -------------------------------------- 9 CHAPTER 2 - API OVERVIEW
2 ---------------------------------------- -------------------------------- 10 Solid Edge Core Type Libraries ---------------------------------------- ---------------------------------------- ------------------------------ 11 Table of core APIs ---------------------------------------- ---------------------------------------- ---------------------------------------- ---- 11 SolidEdgeFramework Type Library ( ) ---------------------------------------- ---------------------------------------- - 12 SolidEdgeFrameworkSupport Type Library ( ) ---------------------------------------- -------------------------------- 12 SolidEdgePart Type Library ( ) ---------------------------------------- ---------------------------------------- ------------------- 12 SolidEdgeGeometry Type Library ( ) ---------------------------------------- ---------------------------------------- --- 12 SolidEdgeAssembly Type Library ( ) ---------------------------------------- ---------------------------------------- ----- 12 SolidEdgeDraft Type Library ( ) ---------------------------------------- ---------------------------------------- ---------------- 12 SolidEdgeConstants Type Library ( )
3 ---------------------------------------- ---------------------------------------- ----- 12 Solid Edge Utility APIs ---------------------------------------- ---------------------------------------- ---------------------------------------- - 13 Table of utility APIs ---------------------------------------- ---------------------------------------- ---------------------------------------- -- 13 SEInstallDataLib ( ) ---------------------------------------- ---------------------------------------- ---------------------- 14 SolidEdgeFileProperties ( ) ---------------------------------------- ---------------------------------------- ---------------- 14 RevisionManager ( ) ---------------------------------------- ---------------------------------------- --------------------------- 14 CHAPTER 3.
4 NET OVERVIEW ---------------------------------------- ------------------------------ 15 Terminology ---------------------------------------- ---------------------------------------- ---------------------------------------- -------------- 16 Application Domain ---------------------------------------- ---------------------------------------- ---------------------------------------- - 16 Assembly ---------------------------------------- ---------------------------------------- ---------------------------------------- --------------- 16 COM Interop ---------------------------------------- ---------------------------------------- ---------------------------------------- ---------- 16 Garbage Collection ---------------------------------------- ---------------------------------------- ---------------------------------------- -- 16 Interop Assemblies ---------------------------------------- ---------------------------------------- ---------------------------------------- -- 16 Marshal Class ---------------------------------------- ---------------------------------------- ---------------------------------------- --------- 16 Runtime Callable Wrapper (RCW)
5 ---------------------------------------- ---------------------------------------- ----------------------- 17 CHAPTER 4 - GETTING STARTED ---------------------------------------- -------------------------- 18 Your first macro ---------------------------------------- ---------------------------------------- ---------------------------------------- --------- 19 Create a new Visual Basic .NET project ---------------------------------------- ---------------------------------------- ---------------- 19 Adding a reference to Solid Edge API------------------------------------- ---------------------------------------- ---------------------- 19 Viewing Interop Assembly References ---------------------------------------- ---------------------------------------- ----------------- 21 Connecting to Solid Edge (Visual ) ---------------------------------------- ---------------------------------------- --------- 24 Connecting to Solid Edge (C#)
6 ---------------------------------------- ---------------------------------------- ---------------------------- 24 3 Introduction Starting Solid Edge (Visual Basic .NET) ---------------------------------------- ---------------------------------------- ----------------- 25 Starting Solid Edge (C#) ---------------------------------------- ---------------------------------------- ------------------------------------ 25 Working with Documents ---------------------------------------- ---------------------------------------- ------------------------------------ 27 Table of document ProgIds ---------------------------------------- ---------------------------------------- ------------------------------- 27 Creating Documents Example (Visual )
7 ---------------------------------------- ---------------------------------------- --- 27 Creating Documents Example (C#) ---------------------------------------- ---------------------------------------- ---------------------- 28 Determining Document Type Example (Visual ) ---------------------------------------- -------------------------------- 30 Determining Document Type Example (C#) ---------------------------------------- ---------------------------------------- ---------- 32 CHAPTER 5 - UNITS OF MEASURE--------------------------------- --------------------------------- 34 Internal Units ---------------------------------------- ---------------------------------------- ---------------------------------------- --------- 35 Working with Units of Measure ---------------------------------------- ---------------------------------------- ---------------------------- 36 Formatting and Displaying Units (Visual ) ---------------------------------------- ---------------------------------------- 36 Formatting and Displaying Units (C#)
8 ---------------------------------------- ---------------------------------------- ------------------ 37 CHAPTER 6 - PART AND SHEET METAL DOCUMENTS ---------------------------------------- 40 Models Collection ---------------------------------------- ---------------------------------------- ---------------------------------------- --- 40 Model Object ---------------------------------------- ---------------------------------------- ---------------------------------------- --------- 40 Reference Planes---------------------------------- ---------------------------------------- ---------------------------------------- ----------- 40 Profiles ---------------------------------------- ---------------------------------------- ---------------------------------------- ------------------ 40 Modeling Coordinate System ---------------------------------------- ---------------------------------------- ----------------------------- 41 2D Geometry ---------------------------------------- ---------------------------------------- ---------------------------------------- ---------- 41 2D Relationships ---------------------------------------- ---------------------------------------- ---------------------------------------- ----- 41 Variables
9 ---------------------------------------- ---------------------------------------- ---------------------------------------- --------------- 42 Part Modeling Examples ---------------------------------------- ---------------------------------------- -------------------------------------- 44 Modeling a Part (Visual Basic .NET) ---------------------------------------- ---------------------------------------- --------------------- 44 Modeling a Part (C#) ---------------------------------------- ---------------------------------------- ---------------------------------------- 47 Variables Examples ---------------------------------------- ---------------------------------------- ---------------------------------------- ----- 53 Variable Table Example(Visual Basic.)
10 NET)------------------------------------ ---------------------------------------- ---------------- 53 Variable Table Example(C#) ---------------------------------------- ---------------------------------------- ------------------------------- 54 Working with Dimensions Overview ---------------------------------------- ---------------------------------------- -------------------- 56 Linear Dimensions ---------------------------------------- ---------------------------------------- ---------------------------------------- --- 56 Radial Dimensions ---------------------------------------- ---------------------------------------- ---------------------------------------- --- 56 Angular Dimensions ---------------------------------------- ---------------------------------------- ---------------------------------------- - 56