SolidWorksMakroprogrammierung

Methode · ConfigurationManager

AddCADFamilyConfiguration-Methode (ConfigurationManager)

Legt eine Konfiguration für SOLIDWORKS mit Anbindung an die 3DEXPERIENCE-Plattform an.

Syntax

Function AddCADFamilyConfiguration( _
   ByVal Name As String, _
   ByVal Description As String, _
   ByVal IsPhysicalProduct As Boolean, _
   ByVal RepresentationParentName As String, _
   ByVal ConfigOptions As Long, _
   ByVal ChildCompDisplayOption As Long, _
   ByVal Rebuild As Boolean _
) As Object
Set swConfig = swConfMgr.AddCADFamilyConfiguration("Variante A", "", True, "", 0, swChildComponent_Show, True)

Parameter

NameStringByVal
Name der Konfiguration.
DescriptionStringByVal
Beschreibung.
IsPhysicalProductBooleanByVal
True: übergeordnete Konfiguration (Physical Product). False: abgeleitete (Representation).
RepresentationParentNameStringByVal
Bei False: Name der übergeordneten Konfiguration.
ConfigOptionsLongByVal
Optionen aus swCADFamilyCfgOptions_e.
ChildCompDisplayOptionLongByVal
Anzeige der Unterkomponenten in der Stückliste, ein Wert aus swChildComponentInBOMOption_e.
RebuildBooleanByVal
True: danach neu aufbauen.

Rückgabewert

Die neue Configuration.

Beispiel

' swConfMgr ist der ConfigurationManager, etwa aus ModelDoc2.ConfigurationManager.
Dim swConfig As SldWorks.Configuration
Set swConfig = swConfMgr.AddCADFamilyConfiguration("Variante A", "", True, "", 0, swChildComponent_Show, True)

Bemerkungen

Nur für SOLIDWORKS mit 3DEXPERIENCE-Anbindung. Für normale Konfigurationen nimm ConfigurationManager.AddConfiguration2.

Ohne 3DEXPERIENCE-Anbindung legt der Befehl keine Konfiguration an und meldet dabei keinen Fehler.

Siehe auch

Verfügbarkeit

SOLIDWORKS 2022

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

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