Hallo
soweit habe ich alles umsetzen können. Ein Problem mit dem DS-Script. Ich möchte auf dem Blatt aktiv sein und dort über den Mausklick die Position bestimmen können?
Also keine Ansicht als Ort der Eingabe verwenden, sondern das Ditto soll auf dem Blatt referenziert sein!
Anbei das DS-Script:
' COPYRIGHT DASSAULT SYSTEMES 2003
' ***********************************************************************
' Purpose: This macro allows you to instantiate a ditto in
' a view from a detail view
' Author:
' Languages: VBScript
' Locales: English
' CATIA Level: V5R11
' ***********************************************************************
Sub CATMain()
' Open the drawing document
Dim oDrawing As DrawingDocument
Set oDrawing = CATIA.ActiveDocument
' Retrieve the sheets collection of the drawing document
Dim oSheets As DrawingSheets
Set oSheets = oDrawing.Sheets
' Retrieve the sheet where the detail view will be instantiated
Dim oSheet As DrawingSheet
Set oSheet = oSheets.Item("Blatt01")
' Retrieve the view where the detail view will be instantiated
Dim oView As DrawingView
Set oView = oSheet.Views.Item("Front view")
oView.Activate
' Retrieve the detail sheet containing the detail view to be instantiated
Dim oDetailSheet As DrawingSheet
Set oDetailSheet = oSheets.Item("Details")
' Retrieve the detail view to be instantiated
Dim oDetailView As DrawingView
Set oDetailView = oDetailSheet.Views.Item("Tabelle")
' Indicate the ditto location
Dim ReturnStatus As String
Dim iDittoCoordinates(1)
Dim oDraw
Set oDraw = oDrawing
ReturnStatus = oDraw.Indicate2D("Indicate the ditto location", iDittoCoordinates)
' Retrieve the drawing components collection of the target drawing view
Dim o2DComponents As DrawingComponents
Set o2DComponents = oView.Components
' Create the ditto
Dim o2DComponent As DrawingComponent
Set o2DComponent = o2DComponents.Add(oDetailView, iDittoCoordinates(0), iDittoCoordinates(1))
End Sub
------------------
mfg
Erich
Eine Antwort auf diesen Beitrag verfassen (mit Zitat/Zitat des Beitrags) IP