SolidWorksMakroprogrammierung

Eigenschaft · BoundingBoxFeatureData

ReferenceFaceOrPlane-Eigenschaft (BoundingBoxFeatureData)

Liest oder setzt, wie der Begrenzungsrahmen ausgerichtet wird: beste Passung, nach einer Fläche oder Ebene oder nach einem Koordinatensystem.

Syntax

Property ReferenceFaceOrPlane As Long
swRahmen.ReferenceFaceOrPlane = swBoundingBoxType_CustomPlane

Wert

Ein Wert aus swGlobalBoundingBoxFitOptions_e: swBoundingBoxType_BestFit (1), swBoundingBoxType_CustomPlane (2) oder swBoundingBoxType_CustomCoordSys (3).

Beispiel

' swRahmen ist die Definition eines Begrenzungsrahmens (BoundingBoxFeatureData), etwa per Set swRahmen = swFeat.GetDefinition.
Select Case swRahmen.ReferenceFaceOrPlane
    Case swBoundingBoxType_BestFit: Debug.Print "Beste Passung"
    Case swBoundingBoxType_CustomPlane: Debug.Print "Nach Fläche oder Ebene"
    Case 3: Debug.Print "Nach Koordinatensystem"     ' swBoundingBoxType_CustomCoordSys, erst ab SOLIDWORKS 2026 SP01
End Select

Bemerkungen

Bei swBoundingBoxType_CustomPlane wählst du vorher eine Fläche oder Ebene aus, etwa mit ModelDocExtension.SelectByRay, und gibst sie mit BoundingBoxFeatureData.PlanarEntity an. Bei swBoundingBoxType_CustomCoordSys legst du BoundingBoxFeatureData.CoordinateSystem und BoundingBoxFeatureData.lwtaDirectionType fest. Das Hilfebeispiel „Create Bounding Box“ setzt die Zahl 2, also swBoundingBoxType_CustomPlane.

Eine neue Definition aus FeatureManager.CreateDefinition steht auf 0, also auf keinem der benannten Werte.

Siehe auch

Verfügbarkeit

SOLIDWORKS 2019

Englisches Original: IBoundingBoxFeatureData::ReferenceFaceOrPlane in der SOLIDWORKS API-Hilfe ↗ (dort mit dem .NET-Namen)

Fragen zu diesem Befehl oder ein Befehl fehlt? Frag im Discord.