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.
Thanks in advance.
INTELLIGENT WORK FORUMS
FOR ENGINEERING PROFESSIONALS Come Join Us!Are you an
Engineering professional? Join Eng-Tips Forums!
*Eng-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail. Posting GuidelinesJobs |
|
RE: Using 'getcoordinates'
RE: Using 'getcoordinates'
RE: Using 'getcoordinates'
RE: Using 'getcoordinates'
RE: Using 'getcoordinates'
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'
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'
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'
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 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'
RE: Using 'getcoordinates'
I've post a VBA code to get XYZ to text file.
indocti discant et ament meminisse periti
RE: Using 'getcoordinates'
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.