AGB  ·  Datenschutz  ·  Impressum  







Anmelden
Nützliche Links
Registrieren
Zurück Delphi-PRAXiS Programmierung allgemein Programmieren allgemein Autodesk Inventor 2008 (CAD Programm)
Thema durchsuchen
Ansicht
Themen-Optionen

Autodesk Inventor 2008 (CAD Programm)

Offene Frage von "Andre.R"
Ein Thema von Andre.R · begonnen am 12. Okt 2007 · letzter Beitrag vom 13. Okt 2007
Antwort Antwort
Andre.R

Registriert seit: 31. Mai 2003
45 Beiträge
 
#1

Autodesk Inventor 2008 (CAD Programm)

  Alt 12. Okt 2007, 19:14
Hallo,

ist es möglich aus Inventorprojekten (also Zeichnungen) die Stückliste auszulesen ?
Gibt es da evtl. eine Möglichkeit über die API ??
Wenn möglich mit Delphi
Leider konnte ich keine Infos im Netz finden...

cu
andre
  Mit Zitat antworten Zitat
madtom

Registriert seit: 24. Feb 2005
Ort: Hamburg
115 Beiträge
 
Delphi XE7 Professional
 
#2

Re: Autodesk Inventor 2008 (CAD Programm)

  Alt 12. Okt 2007, 19:57
Hallo, Autodesc-Anwendungen hatten bis jetzt für gewöhnlich eine Automationsschnittstelle und ließen
sich außerdem mit VBA programmieren. Vielleicht findest Du im Netz ja VBA-Beispiele zu Deinem Thema,
diese sollten sich mit etwas Arbeit dann auch nach Delphi portieren lassen.
Thomas
Delphi Programming
  Mit Zitat antworten Zitat
Andre.R

Registriert seit: 31. Mai 2003
45 Beiträge
 
#3

Re: Autodesk Inventor 2008 (CAD Programm)

  Alt 12. Okt 2007, 20:18
Hallo madtom,

so stehts in der API Beschreibung :

Zitat:

Description
The PartsList object represents a parts list in a drawing sheet.
For a list of all members defined in this module, see PartsList members.

Example
[Parts List Query Example (Visual Basic)] This sample illustrates querying the contents of the parts list. To run this sample have a sheet active that contains a parts list.

Public Sub PartListQuery()
' Set a reference to the drawing document.
' This assumes a drawing document is active.
Dim oDrawDoc As DrawingDocument
Set oDrawDoc = ThisApplication.ActiveDocument

' Set a reference to the first parts list on the active sheet.
' This assumes that a parts list is on the active sheet.
Dim oPartList As PartsList
Set oPartList = oDrawDoc.ActiveSheet.PartsLists.Item(1)

' Iterate through the contents of the parts list.
Dim i As Long
For i = 1 To oPartList.PartsListRows.Count
' Get the current row.
Dim oRow As PartsListRow
Set oRow = oPartList.PartsListRows.Item(i)

' Iterate through each column in the row.
Dim j As Long
For j = 1 To oPartList.PartsListColumns.Count
' Get the current cell.
Dim oCell As PartsListCell
Set oCell = oRow.Item(j)

' Display the value of the current cell.
Debug.Print "Row: " & i & ", Column: " & oPartList.PartsListColumns.Item(j).Title & " = "; oCell.Value
Next
Next
End Sub



[Parts List Edit Example (Visual Basic)] This sample illustrates editing the contents of the parts list. To run this sample have a sheet active that contains a parts list.

Public Sub PartListEdit()
' Set a reference to the drawing document.
' This assumes a drawing document is active.
Dim oDrawDoc As DrawingDocument
Set oDrawDoc = ThisApplication.ActiveDocument

' Set a reference to the first parts list on the active sheet.
' This assumes that a parts list is on the active sheet.
Dim oPartList As PartsList
Set oPartList = oDrawDoc.ActiveSheet.PartsLists.Item(1)

' Iterate through the contents of the parts list.
Dim i As Long
For i = 1 To oPartList.PartsListRows.Count
' Get the current row.
Dim oRow As PartsListRow
Set oRow = oPartList.PartsListRows.Item(i)

' Iterate through each column in the row.
Dim j As Long
For j = 1 To oPartList.PartsListColumns.Count
' Get the current cell.
Dim oCell As PartsListCell
Set oCell = oRow.Item(j)

' Check that the column isn't the quantity column.
If oPartList.PartsListColumns.Item(j).Title <> "QTY" Then
' Change the current value in the part list.
oCell.Value = i & "," & j
End If
Next
Next

' This changes a specific column by name.
Dim ItemNumber As Long
ItemNumber = oPartList.PartsListRows.Count
For i = 1 To oPartList.PartsListRows.Count
Set oCell = oPartList.PartsListRows.Item(i).Item("ITEM")
oCell.Value = ItemNumber
ItemNumber = ItemNumber - 1
Next
End Sub



See Also
PartsList Members

Example
Creating a parts list
Das scheint VB zu sein ! Oder ?

cu
  Mit Zitat antworten Zitat
madtom

Registriert seit: 24. Feb 2005
Ort: Hamburg
115 Beiträge
 
Delphi XE7 Professional
 
#4

Re: Autodesk Inventor 2008 (CAD Programm)

  Alt 13. Okt 2007, 09:31
Das ist Visual Basic (VBA = Visual Basic for Applications). Ich bin leider in der Ole-Automation
auch nicht so fit, meine Automationsprojekte bezogen sich auf Word bzw. Excel und das ist, denke
ich, etwas einfacher (Schon weil man dort nicht der Einzige ist). Gibt die Online-Hilfe des Inventors
nichts her zum Thema Automation, Typbibliotheken und Co...? Ich hatte einmal ein Delphi-Projekt
zum Thema Ole-Automation und AutoCad im Internet gefunden, das auch funktionierte...

Beste Grüße

madtom
Thomas
Delphi Programming
  Mit Zitat antworten Zitat
Antwort Antwort


Forumregeln

Es ist dir nicht erlaubt, neue Themen zu verfassen.
Es ist dir nicht erlaubt, auf Beiträge zu antworten.
Es ist dir nicht erlaubt, Anhänge hochzuladen.
Es ist dir nicht erlaubt, deine Beiträge zu bearbeiten.

BB-Code ist an.
Smileys sind an.
[IMG] Code ist an.
HTML-Code ist aus.
Trackbacks are an
Pingbacks are an
Refbacks are aus

Gehe zu:

Impressum · AGB · Datenschutz · Nach oben
Alle Zeitangaben in WEZ +1. Es ist jetzt 01:40 Uhr.
Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024 by Thomas Breitkreuz