Milie
Computer
- Nov 27, 2013
- 12
Hello!
I'm using Catia V5 and I did a macro in CATScript creating scenes and I would like also the macro to switch the view to one of my created scenes.
Here is my macro : it's creating 1 scene per product of the "first row" of the product tree :
I would like for example to switch programmatically to the last scene (or the first, whatever).
Thank you for your help!
Emilie
I'm using Catia V5 and I did a macro in CATScript creating scenes and I would like also the macro to switch the view to one of my created scenes.
Here is my macro : it's creating 1 scene per product of the "first row" of the product tree :
Code:
Sub CATMain()
Dim i As Integer
Dim products As Products
Dim product As Product
Dim px(1)
Dim ProductCountName As String
Dim TheScenes
Dim oScene1 As ProductScene
Dim RootProduct 'As Product
' Get the root of the CATProduct
Set RootProduct = CATIA.ActiveDocument.Product
Set products = RootProduct.Products
docCount=products.Count
For i=1 to docCount
Set product = products.Item(i)
ProductCountName = product.Name
Set px(0) = products.Item(ProductCountName)
' Retrieve the ProductScenes collection
Set TheScenes = RootProduct.GetTechnologicalObject("ScenesCollection")
Set oScene1 = TheScenes.AddProductSceneFull (ProductCountName, px)
Next
End Sub
I would like for example to switch programmatically to the last scene (or the first, whatever).
Thank you for your help!
Emilie