Hot News:

Unser Angebot:

  Foren auf CAD.de
  ENOVIA SmarTeam
  retrieving the attributes of the generally linked object...

Antwort erstellen  Neues Thema erstellen
CAD.de Login | Logout | Profil | Profil bearbeiten | Registrieren | Voreinstellungen | Hilfe | Suchen

Anzeige:

Darstellung des Themas zum Ausdrucken. Bitte dann die Druckfunktion des Browsers verwenden. | Suche nach Beiträgen nächster neuer Beitrag | nächster älterer Beitrag
  
Online-Kurs: Grundlagen des 3D-Druck-Designs für Industrieingenieure , ein Kurs
Autor Thema:  retrieving the attributes of the generally linked object... (931 mal gelesen)
purdueman
Mitglied


Sehen Sie sich das Profil von purdueman an!   Senden Sie eine Private Message an purdueman  Schreiben Sie einen Gästebucheintrag für purdueman

Beiträge: 7
Registriert: 09.08.2005

erstellt am: 08. Mai. 2006 13:22    Editieren oder löschen Sie diesen Beitrag!  <-- editieren / zitieren -->   Antwort mit Zitat in Fett Antwort mit kursivem Zitat    Unities abgeben: 1 Unity (wenig hilfreich, aber dennoch)2 Unities3 Unities4 Unities5 Unities6 Unities7 Unities8 Unities9 Unities10 Unities

hi,
sorry, i can't tell my problem in German.
If you checked the code in BOM.bs, it is possible to retrieve the attributes from its sub-classes and super class and write its values to an excel file. Using SuperClassId and DefaultHierachicalClassId, we can easily access to the attributes of the selected object and the attributes of the sub-objects, but what about the attributes of the generally linked objects???
My problem is that, after creating a general link with any object, is it possible to retrieve the attributes of the linked object and to write them to an excel file. We can put the name of the linked class and the attribute of the linked object to .ini file.
Thanks already for your help.

Eine Antwort auf diesen Beitrag verfassen (mit Zitat/Zitat des Beitrags) IP

Laurent
Mitglied
Systemadministrator

Sehen Sie sich das Profil von Laurent an!   Senden Sie eine Private Message an Laurent  Schreiben Sie einen Gästebucheintrag für Laurent

Beiträge: 1
Registriert: 25.08.2006

erstellt am: 25. Aug. 2006 15:08    Editieren oder löschen Sie diesen Beitrag!  <-- editieren / zitieren -->   Antwort mit Zitat in Fett Antwort mit kursivem Zitat    Unities abgeben: 1 Unity (wenig hilfreich, aber dennoch)2 Unities3 Unities4 Unities5 Unities6 Unities7 Unities8 Unities9 Unities10 Unities Nur für purdueman 10 Unities + Antwort hilfreich

I am not sure if I understood your question, but you can retrieve the secondary object of a general link by performing a query.

-------------------------------------------------------------------------------
Example in VB6:

Public Sub GetSecondaryObj(ByVal oSession As SmApplic.SmSession, _
                                    ByVal oLink As SmApplic.ISmObject, ByRef oSObj As SmApplic.ISmObject)
  Dim oQuery As SmApplic.ISmSimpleQuery
  Dim oResult As SmRecList.SmRecord
 
  Set oQuery = oSession.ObjectStore.NewSimpleQuery
 
  oQuery.SelectStatement = "select  S.OBJECT_ID,S.CLASS_ID,S.TDM_ID " & _
                          "from TN_LINK_00007" & " L, TN_DOCUMENTATION S " & _
                          "where L.CLASS_ID=" & oLink.ClassId & " and " & _
                          "(L.OBJECT_ID=" & oLink.ObjectId & " and L.OBJECT_ID2=S.OBJECT_ID) "
 
  oQuery.Run
  If oQuery.QueryResult.RecordCount > 0 Then
    Set oResult = oQuery.QueryResult.GetRecord(0)
    Set oSObj = oSession.ObjectStore.ObjectFromData(oResult, True)
  Else
    Set oSObj = Nothing
  End If
End Sub
-------------------------------------------------------------------------------
F --L--> S
if L is the link,
L.OBJECT_ID1 is the first (F) object
L.OBJECT_ID2 is the secondary (S) object.

If you want to retrieve more attributes than just OBJECT_ID, CLASS_ID, TDM_ID, add them in the "select" list.

The internal name of a general link is TN_LINK_00007 (Documents Documents Relation) You can find the names of the tables directly in the database. They are listed in the TDM_CLASS table.

Good luck

Eine Antwort auf diesen Beitrag verfassen (mit Zitat/Zitat des Beitrags) IP

Anzeige.:

Anzeige: (Infos zum Werbeplatz >>)

Darstellung des Themas zum Ausdrucken. Bitte dann die Druckfunktion des Browsers verwenden. | Suche nach Beiträgen

nächster neuerer Beitrag | nächster älterer Beitrag
Antwort erstellen


Diesen Beitrag mit Lesezeichen versehen ... | Nach anderen Beiträgen suchen | CAD.de-Newsletter

Administrative Optionen: Beitrag schliessen | Archivieren/Bewegen | Beitrag melden!

Fragen und Anregungen: Kritik-Forum | Neues aus der Community: Community-Forum

(c)2025 CAD.de | Impressum | Datenschutz