×
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

Using 'getcoordinates'
5

Using 'getcoordinates'

Using 'getcoordinates'

(OP)
Can anyone help me figure out how to use the technique 'getcoordinates' of a point from a different axis system???

Thanks in advance.

RE: Using 'getcoordinates'

read PInt - CAA IDL in help docs

RE: Using 'getcoordinates'

(OP)
Thanks for the information, but I was wondering if you can provide some clarification?? Which 'help docs' are you referring to? Is there a link to this information that you can provide?

RE: Using 'getcoordinates'

the docs are found in the help menu. all you have to do is point to the html file the first time. I believe it's a saparate installation. roughly around 1.5GB. usually stored on the network in a company environment.

RE: Using 'getcoordinates'

(OP)
Thanks for the help. Now, within the help documentation I assume I need to be looking in the 'Automation Documenatation'. But, I can't seem to find information about PInt - CAA IDL within this. Any other ideas that I can try?

RE: Using 'getcoordinates'

Hi,

Go to c:\Program Files\Dassault Systemes\B14\intel_a\code\bin\V5Automation.chm and do a search of what you want

Regards
Fernando

RE: Using 'getcoordinates'

(OP)
Thanks to everyone for their valuable input, but, unfortunately I am not any closer to a solution. My problem is that I have some code in a macro that finds the coordinate information of some points but the X,Y,Z values are based from the default axis system:

Set originPts = hybridShapes1.Item(1)
    originPts.GetCoordinates originCoord

What I would like to find out how to do is the same X,Y,Z values for these points except relative to a different axis system.

RE: Using 'getcoordinates'

It seems to me that your problem is not with the GetCoordinates object, but rather the originCoord variable.

Don't you just need to swap it out for the coordinate system that you're after? (set the new coordinate system = to newCoord, and replace the originCoord variable)

---
CAD design engineering services -  Catia V4, Catia V5, and CAD Translation.  Catia V5 resources - CATBlog.

RE: Using 'getcoordinates'

(OP)
Unfortunately, I have the same problem with however I have my varible named. I originaly had my code like this:

Dim pts
Dim Coord(3)
Set hybridShapes1 = hybridBody1.HybridShapes
nump = hybridShapes1.Count

For i = 1 to nump
Set pts = hybridShapes1.Item(1)
    pts.GetCoordinates Coord

'display result

next i

Extracting the coordinate values of the points I have in the hybrid body that this is searching gets the coordinates based on the default axis system.

I'm trying to write my code to act like the Measure tool does when the 'Other Axis' box is checked.

RE: Using 'getcoordinates'

You'll find that it isn't possible to get the coordinates relative to another axis system using the VB API.

You need to get the point coordinates relative to the part axis system and then get the axis system origin and orientation vectors relative to the part axis system (assuming they are both in the same part).

Once you have this you need to perform the appropriate  matrix transformations to calculate the point position relative to the axis system.

If the points and the axis system are in different parts of the product it becomes much more complex.

I think that you also have an error in your code:
 Dim Coord(3)
should be:
 Dim Coord(2)

If you've just created the point in your script, make sure that the part has been updated before you call GetCoordinates.

RE: Using 'getcoordinates'

(OP)
Thanks for everyone's help. Looks like I'll go to plan "B" and do some calculating.

RE: Using 'getcoordinates'

Have a look at catiav5forum.com  in the download area.

I've post a VBA code to get XYZ to text file.

Eric N.
indocti discant et ament meminisse periti

RE: Using 'getcoordinates'

AHay's idea seems to be a good one.

If I understand this correctly, one could create the relevant coordinate system, and write a macro that would do the following:

1) axis to axis translation of the numbered points, one at a time AS A COPY. (all steps are based on the i=1 to number approach, including step 1)

2) measure point in originCoord. (to which it was just translated - relative measures are identical)

3) return value to Excel

4) delete copied point

5) loop to next point, until end

---
CAD design engineering services -  Catia V4, Catia V5, and CAD Translation.  Catia V5 resources - CATBlog.

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