iTooltip
Displays a tooltip as soon as an object is located under the mouse without being selected. oOutputState
The state of the selection command once SelectElement3 returns. It can be either \\ Example:
The following example supposes a part, containing a pad, and drawing are currently edited, the drawing window beeing the current window. It asks the end user to select a 2-D topological entity, such as a Plane, in a part. Then it creates a front view in the drawing, projecting the 3D geometry onto the selected 2-D topological entity.
Dim DrawingSelection,DrawingSheets,DrawingSheet,DrawingViews,DrawingFrontView : ReDim DrawingSelectionAtBeginning(1) Dim
Status,InputObjectType(0),Plane,Drawing,DrawingViewGenerativeBehavior,V1(2),V2(2),PartDocument
Set Drawing = CATIA.ActiveDocument : Set DrawingSelection = Drawing.Selection : Set DrawingSheets = Drawing.Sheets
Set DrawingSheet = DrawingSheets.ActiveSheet 'We save the current selection content
ReDim DrawingSelectionAtBeginning(DrawingSelection.Count2) for SelectionObjectIndex = 0 to DrawingSelection.Count2-1 Set DrawingSelectionAtBeginning(SelectionObjectIndex) = DrawingSelection.Item2(1).Value next
SelectionAtBeginningLength = DrawingSelection.Count2 'Feature creation
InputObjectType(0)=\
Status=DrawingSelection.SelectElement4(InputObjectType,\entity in a 3-D geometry\
\entity\
if ((Status = \' We restore the selection to its initial content PartDocument.Selection.Clear
for SelectionObjectIndex = 0 to SelectionAtBeginningLength-1
DrawingSelection.Add DrawingSelectionAtBeginning(SelectionObjectIndex) next Exit Sub else
Set BiDimFeature = PartDocument.Selection.Item2(1).Value BiDimFeatureType = TypeName(BiDimFeature)
if ((BiDimFeatureType=\ BiDimFeature.GetFirstAxis V1 BiDimFeature.GetSecondAxis V2
else Exit Sub end if
' We create a view called \View\in the current sheet, using Plane as projection plane, and whose origin ' coordinates are 300,150
Set DrawingFrontView = DrawingSheet.Views.Add(\
Set DrawingViewGenerativeBehavior = DrawingFrontView.GenerativeBehavior DrawingViewGenerativeBehavior.Document = PartDocument
DrawingViewGenerativeBehavior.DefineFrontView V1(0), V1(1), V1(2), V2(0), V2(1), V2(2)
DrawingFrontView.x = 300 DrawingFrontView.y = 150
DrawingViewGenerativeBehavior.Update ' We clear the PartDocument Selection object PartDocument.Selection.Clear end if