×
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!

*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

CATScript to fill in compass parameters

CATScript to fill in compass parameters

CATScript to fill in compass parameters

(OP)
Good morning!

I searched this forum, my Ziethen book, and the portable script by Ferdo and do not
see how to manipulate the compass parameters via macro.

What I wanted to do is to fill in the Increments section: Along U Along V, Along W,
and the rotation boxes with some standard values.

If you can clue me in to the commands used in modifying the compass parameters
I can write the rest of the macro. ( or let me know if it is even an option )

Thanks!

RE: CATScript to fill in compass parameters

(OP)
Some of the details we have in our tooling designs need to be on
even 25mm xyz positions. 0, 25, 50, 75, etc.. So, we fill in the
Compass parameters along U V W with a value of 25 then drag the
detail around to where we want it.

We do this type of thing with other details but move them around
in other various increments to keep their 3D positions on even
metric positions. Helps a lot with builders and dealing with even
numbers than numbers with odd decimal values like 23.76. Prefer 23.00

RE: CATScript to fill in compass parameters

(OP)
Okay! Thank you!

RE: CATScript to fill in compass parameters

you can always use WIN API...

Eric N.
indocti discant et ament meminisse periti

RE: CATScript to fill in compass parameters

(OP)
I did consider trying Send Keys option but decided to investigate a more direct fill in
the box approach. I have dabbled with Send Keys once before and unless I was doing something
wrong the results were not consistent. ( keys didn't always send.. )

I'll investigate a send keys approach.
Thank you!

RE: CATScript to fill in compass parameters

Hello JayEnn1,
I need exactly the same thing and I think the correct approach would be to manipulate the position matrix. Search in portable script after rotation and you will find there one example. Unfortunately, I am not able to manipulate the position matrix as I need :( but I plan to invest more time in it.
If you have progress with the send keys, please post it so I can use it myself :)

RE: CATScript to fill in compass parameters

(OP)
Thank you Iscariot!

I looked briefly at the rotation script. Hopefully later this week I will dig deeper
into your suggestion. I have some work that needs to get done first before scripting.

I did dabble with send keys a little bit. I need to read thru some more examples to
figure it out.

I did see on the internet, COE website, the code below but couldn't get it working.
Kept stopping at AppActivate instruction.
http://www.coe.org/p/fo/et/thread=27510


Sub CATMain()

CATIA.DisplayFileAlerts = False

CATIA.HSOSynchronized = False

CATIA.StartCommand ("Edit Compass")

AppActivate "CATIA V5"

CATIA.HSOSynchronized = True

SendKeys "+{TAB}", True
SendKeys "{ENTER}", True
SendKeys "{TAB}", True
SendKeys "^A", True
SendKeys "{DEL}", True
SendKeys "{1}", True
SendKeys "{TAB 3}", True
SendKeys "90", True
SendKeys "{TAB 3}", True
SendKeys "{1}", True
SendKeys "{TAB 3}", True
SendKeys "90", True
SendKeys "{TAB 3}", True
SendKeys "{1}", True
SendKeys "{TAB 3}", True
SendKeys "90", True
SendKeys "{TAB 9}", True
SendKeys "{ENTER}", True

End Sub

This one resets everything to zero

Sub CATMain()

CATIA.DisplayFileAlerts = False

CATIA.HSOSynchronized = False

CATIA.StartCommand ("Edit Compass")

AppActivate "CATIA V5"

CATIA.HSOSynchronized = True

SendKeys "+{TAB}", True
SendKeys "{ENTER}", True
SendKeys "+{TAB}", True
SendKeys "{ENTER}", True

End Sub

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! Already a Member? Login


Resources

eBook - The Future of Product Development is Here
Looking to make the design and manufacturing of your products more agile? For engineering and manufacturing organizations, the need for digital transformation of product development processes just became more urgent than ever so we wanted to share an eBook that will help you build a practical roadmap for your journey. Download Now

Close Box

Join Eng-Tips® Today!

Join your peers on the Internet's largest technical engineering professional community.
It's easy to join and it's free.

Here's Why Members Love Eng-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close