Continue to Site

Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

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

Macro to create points

Status
Not open for further replies.

Teopado89

Mechanical
Jun 21, 2015
2
IT
Good morning everyone,
i'm a young engineer with very few knowledge about the macro language in Catia.
I'm looking for a macro to do this:

in the active file i have on the screen
i'd like to start the macro
select one entity (a solid cilynder, or a hole, or a cilyndrical surface)
then create its axis
select a second entity (a solid cilynder, or a hole, or a cilyndrical surface)
then create it's axis
use the command distance (between the two axis created above) to create the two points long the distance line (if the 2 axis don't have points in common, or just the first point if the two axis have a common point) and also keep the distance measure just on the screen.

Repeat it from the beginning to select two other entities and create new points.

Does anybody have any idea to create it?

Thanks a lot

Matteo
 
Replies continue below

Recommended for you

macro could be nice but I would suggest you look into power copy. I don't know if PC could handle measure, but you could investigate :)

If you really and a macro I am sure you could find some very good starting point in the CATIA script center:

search things like filter on selection (to have only cylindrical surface/face), measure between 2 elements... then put your code here and we'll help you.



Eric N.
indocti discant et ament meminisse periti
 
if it's a standard hole like nutplate I would also suggest to use power copy together with macro. there are some examples over the Internet how to do that. if to use only macro for that there's no point in automation for me.
 
Thanks for all the suggestions,
i was learning how the power copy works.
But it seems it cannot manage the measure command (i tried and the power copy copies everything, but it creates the measure in the same first selection).
I'll try better in the next days.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Top