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 ObjectSet swConfig = swConfMgr.AddCADFamilyConfiguration("Variante A", "", True, "", 0, swChildComponent_Show, True)Parameter
NameStringByVal- Name der Konfiguration.
DescriptionStringByVal- Beschreibung.
IsPhysicalProductBooleanByValTrue: ü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. RebuildBooleanByValTrue: 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.