Hallo~~euch
Mit eurer Hilfe kann ich einigermassen API verstehen, und umschreibe.
Danke euch~~^^
Jetzt sind 2 Teile in Baugruppe geladen, und zwar wuerde ich
gerne die Teile 'MATE' machen.
'Mate.GetMateParams' habe ich gefunden. In Hilfe ist so geschrieben.
-------------------------------------------------------------
retval = Mate.GetMateParams ()
Return:
(VARIANT) retval
VARIANT of type SafeArray containing three longs:mateType, alignFlag, and canBeFlipped (see Remarks)
Remarks
alignFlag - 1 if the mated entities are aligned, 2 if the mated entities are anti-aligned.
canBeFlipped - 2 if the mated entities can be flipped, 1 otherwise. This is only useful for mating conditions with dimensional values.
-------------------------------------------------------------------
Den Retval in meiner Macro zugefuehrt. Einen Meldung kommt.
objekt erforderlich. Dafuer gibt es keine Beispielen.
mein Macro.
----------------------------------------------
Dim swApp As Object
Dim Part As Object
Dim boolstatus As Boolean
Dim longstatus As Long, longwarnings As Long
Dim FeatureData As Object
Dim Feature As Object
Dim Component As Object
Dim AssemblyDoc As Object
Dim retval As Boolean
Dim Mate As Variant
Sub main()
Const x = 0
Const y = 0
Const z = 0
Set swApp = CreateObject("SldWorks.Application")
Set Part = swApp.ActiveDoc
swApp.Visible = True
retval = Part.AddComponent("H:\bitte_schokoeier.sldprt", x, y, z)
retval = Part.AddComponent("H:\schokoeier1.sldprt", x, y, z)
retval = Mate.GetMateParams(1)
End Sub
----------------------------------------------------
Gruss Joohwa
Eine Antwort auf diesen Beitrag verfassen (mit Zitat/Zitat des Beitrags) IP