Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations cowski on being selected by the Eng-Tips community for having the most helpful posts in the forums last week. Way to Go!

Circle2D SetData

Status
Not open for further replies.

RobLawson

Computer
Joined
Aug 4, 2004
Messages
2
Location
FR
Hi,

When I try to use the Circle2D objects SetData method from the R11 VBA environment, if I type the Circle2D object I get told I'm using a restricted method. If I do not type the variable, I'm told the SetData method fails. I'm sure this is a silly problem, anybody able to help me, please?!?

Many thanks,
Rob Lawson.
rob.lawson@airbus.com
 
Hello Rob
have You created the circle already?
then You have to identify what circle is to be modified,
in VBA You have nice Insert/Object resolution tool
to get definition of the object, it uses the name of object to identify the modified element
here is sample:

Sub catmain()

'---- Begin resolution script for object : Circle.1

Dim drawingDocument1 As DrawingDocument
Set drawingDocument1 = CATIA.ActiveDocument

Dim drawingSheets1 As DrawingSheets
Set drawingSheets1 = drawingDocument1.Sheets

Dim drawingSheet1 As DrawingSheet
Set drawingSheet1 = drawingSheets1.Item("Sheet.1")

Dim drawingViews1 As DrawingViews
Set drawingViews1 = drawingSheet1.Views

Dim drawingView1 As DrawingView
Set drawingView1 = drawingViews1.Item("View.1")

Dim geometricElements1 As GeometricElements
Set geometricElements1 = drawingView1.GeometricElements

Dim circle2D1 As Circle2D
Set circle2D1 = geometricElements1.Item("Circle.1")
'---- End resolution script
'example of using SetData method
Dim dX As Double
Dim dY As Double
Dim dR As Double
dX = 15#
dY = 15#
dR = 15#
circle2D1.SetData dX, dY, dR
End Sub

regards TPale
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top