Automation |
Frequently Asked Questions About Automation |
|
Quick Reference |
AbstractThe questions below come either from CAA partners or customers, or from the Dassault Systèmes group.
|
First beware to the syntax:
Redim aCoord(2) oPoint.GetCoordinates aCoordThen, if the point has just been created, as the coordinates are the result of the evaluation of the point, they might not be available so compute it first either directly using the Compute method or using
Part::Update
:
Set oPoint = oHSFactory.AddNewPointOnCurveFromPercent (...) oHBody1.AppendHybridShape oPoint oPart.InWorkObject = oPoint oPart.Update ' --> MANDATORY TO HAVE COORDINATES oPoint.GetCoordinates coord1 ' --> OK now ...
[Top]
Use the GetObject
or CreateObject
global functions.
For more details, look in Invoking
CATIA from a Scripting Language.
Dim CATIA As Object Set CATIA = GetObject (, "CATIA.Application") ' has to be running MsgBox CATIA.ActiveDocument.Name
[Top]
It's the parent of the reference product:
' Print the name of the documebt containing my product MsgBox myProduct.ReferenceProduct.Parent.Name
[Top]
Fetch the document to which the product belongs and test its type.
[Top]
Except when directly available in the aggregating collection, you generally
have to put it in the selection (it has to be part of the active document) and
use the Selection::Delete
method:
Dim oSel As Selection Set oSel = CATIA.ActiveDocument.Selection oSel.Clear oSel.Add(myElement) oSel.Delete
[Top]
Get a reference from the target Point and use it to valuate the Origin property of the Line
[Top]
Reference products are nom clearly identified as such. The Products::AddComponent
methods now needs a reference product that can be obtained from a Product using
its ReferenceProduct property:
dim refProduct As Product set refProduct=Funnel1.ReferenceProduct Dim Funnel2 As Product Set Funnel2 = TitanicProducts.AddComponent(refProduct)
Version: 1 [Dec 2001] | Document created |
[Top] |
Copyright © 2001, Dassault Systèmes. All rights reserved.