Hallo Andreas,
ich hab was entdeckt und zwar handelt es sich um den optionalen Parameter Local. Diesen auf False stellen. Somit generiert er eine globale Ebene. Bei Local=True ist das eine lokale Ebene ohne Namen und defaultmässig unsichtbar.
Code VB.NET
Dim objApp As SolidEdgeFramework.Application
Dim objDoc As SolidEdgePart.PartDocument
Dim objrefPlanes As SolidEdgePart.RefPlanes 'Referenzebenen
Dim objrefPlane As SolidEdgePart.RefPlane
objApp = GetObject(, "SolidEdge.Application")
objApp.Visible = True
objDoc = objApp.ActiveDocument
objrefPlanes = objDoc.RefPlanes
Dim boollocal As Boolean = False
objrefPlane = objrefPlanes.AddParallelByDistance(objrefPlanes.Item(1), 10 / 100, SolidEdgePart.ReferenceElementConstants.igReverseNormalSide, , , boollocal)
objrefPlane.Name = "Parallel zu X/Y Abstand 100"
objrefPlane = objrefPlanes.AddParallelByDistance(objrefPlanes.Item(2), 20 / 100, SolidEdgePart.ReferenceElementConstants.igReverseNormalSide, , , boollocal)
objrefPlane.Name = "Parallel zu Y/Z Abstand 200"
objrefPlane = objrefPlanes.AddParallelByDistance(objrefPlanes.Item(3), 15 / 100, SolidEdgePart.ReferenceElementConstants.igReverseNormalSide, , , boollocal)
objrefPlane.Name = "Parallel zu X/Z Abstand 150" 'objrefPlane.Visible = True
'Aufräumen
If IsNothing(objApp) Then
Else
System.Runtime.InteropServices.Marshal.ReleaseComObject(objApp)
End If
If IsNothing(objDoc) Then
Else
System.Runtime.InteropServices.Marshal.ReleaseComObject(objDoc)
End If
If IsNothing(objrefPlane) Then
Else
System.Runtime.InteropServices.Marshal.ReleaseComObject(objrefPlane)
End If
If IsNothing(objrefPlanes) Then
Else
System.Runtime.InteropServices.Marshal.ReleaseComObject(objrefPlanes)
End If
Gruss Matthias
------------------
SE V16 SP5
SePropManager.NET von www.leemann-software.net
[Diese Nachricht wurde von Matthias Leemann am 12. Apr. 2005 editiert.]
Eine Antwort auf diesen Beitrag verfassen (mit Zitat/Zitat des Beitrags) IP