×
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

Changing Distance Mate With Macro

Changing Distance Mate With Macro

Changing Distance Mate With Macro

(OP)
Hello everybody,
I did a simulation in Excel and the model in Solidworks, all I wanna do now is controling some distance mates, but, I can't set EditMate2 function to work, keeps getting error 13 (types don't match). I got this error even after I recorded the macro! (Record-> change mate value -> Stop). I'm the very basics of writing macros with SW, but not new to VBA...
Is there any light at the end of the tunnel??
Best Regards

Ps: Sorry my bad English, I'm Brazilian

RE: Changing Distance Mate With Macro

Don't edit the mate in the macro to change your distance.  You only need to edit the mate dimension, which can be selected by name.

Record a macro as you double-click the mate in the feature tree, select (double-click) the mate dimension when it becomes visible, and change the dimension.  This will show you how SW macro can change a parameter like a dimension.

batHonesty may be the best policy, but insanity is a better defense.bat
http://www.EsoxRepublic.com-SolidWorks API VB programming help

RE: Changing Distance Mate With Macro

(OP)
I cannot thank you enough
Eternally grateful (ok, not that much)

As expected, that worked perfectly!
Thnaks Again

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