×
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

Positioning Dimensions with a CATIA Macro

Positioning Dimensions with a CATIA Macro

Positioning Dimensions with a CATIA Macro

(OP)
I am trying to make and position dimensions on a drawing using a macro. I can successfully create dimensions, and I found a method .moveValue that will move the dimension, but I can't figure out how to use it correctly.

From the help document:
MyDimension.MoveValue(X, Y, SubPart, DimAngleBehavior)

Here is what I am currently trying:
Dim pinDimElements(1)
Dim pinDim As Object
pinDimElements(1) = Array(drwPin) 'drwPin is a circle I created earlier in the code.
Dim selpoints(3)
selpoints(3) = Array(0, 0, 0, 0)
Set pinDim = oActiveView.Dimensions.Add(9, pinDimElements(1), selpoints(3), 4)
Dim test As Object
Set test = pinDim.moveValue(0.5 * 25.4, 0.5 * 25.4, 5, 0)

This code actually does move the dimension where I want it, but I get the error: "Object required"

Are there any examples macros for manipulating dimensions? I am not finding very much with Google.

RE: Positioning Dimensions with a CATIA Macro

(OP)
I figured it out. I didn't realize I could just call the method.

Call pinDim.moveValue(0.5 * 25.4, 0.5 * 25.4, 5, 0)

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