Hi Alp,
meines wissens nach gibt es keinen SMARTEAM Automatismus um dieses zu tun.
Wir haben uns eine Routine programmiert, die alles von allem kopieren kann. Z.B. Einträge vom Projekt in die Dokumente-Profilkarte, ebenso wie von ausgewählten Ordnern oder anderen 'Parent' Objekten.
Ich habe den Teil für die Projekte einmal rausgelöst, schau mal ob Du damit etwas anfangen kannst :
Gruß
Christian
Dim Project As ISmObject
Dim GUI As SmCommonGUI
Set GUI = smsession.GetService("SmGUISrv.SmCommonGUI")
Dim ViewWindow As ISmViewWindow
Set ViewWindow = GUI.ActiveViewWindow
If Not ViewWindow Is Nothing Then
' the script is called from the documents view
Dim View As ISmView
Set View = ViewWindow.smView
Dim Controller As Object ' variant object of SmGUISrv.ISmGUIComponent class fam
Set Controller = View.Controller
' main object for view is requested project
Set Project = Controller.DataSource.MainClassObject
End If
If Project Is Nothing Then
' the script is called from the integration
Dim SmCAD As SmCADInterface
Set SmCAD = smsession.GetService("SmCAD.SmCADInterface")
Dim ProjectObjId As Long
Dim ProjectClassId As Integer
Dim RetCode As Integer
RetCode = SmCAD.GetProject(ProjectObjId, ProjectClassId)
If ProjectObjId = -2147483647 Or ProjectObjId = 0 Then
MsgBox "Kein Projekt gewählt", vbOKOnly, "ProjectToDocument"
ProjectToDocument = ercGen
Exit Function
Else
Set Project = smsession.ObjectStore.RetrieveObject(ProjectClassId, ProjectObjId)
End If
End If
'' Nun kommt nur noch das Kopieren der Attributevalues die man gerne haben möchte.
'' thidrec.value("CN_PROJECT_ID") = project.data.value("TDM_ID")... oder so
Eine Antwort auf diesen Beitrag verfassen (mit Zitat/Zitat des Beitrags) IP