×
INTELLIGENT WORK FORUMS
FOR ENGINEERING PROFESSIONALS

Log In

Come Join Us!

Are you an
Engineering professional?
Join Eng-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Eng-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Jobs

Circle2D SetData

Circle2D SetData

Circle2D SetData

(OP)
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

RE: Circle2D SetData

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

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Eng-Tips Forums free from inappropriate posts.
The Eng-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Eng-Tips forums is a member-only feature.

Click Here to join Eng-Tips and talk with other members!


Resources