- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hello.. I am currently writing some software to automate various tasks.
The issue I'm having is I seem to be getting bogus information from the transformation matrix on SOME components and it makes ZERO sense...
The workflow in a nutshell is:
Get Application pointer -> InventorApplicationPointer
Get pointer to active document (ActiveDoc = InventorApplicationPointer.ActiveDocument)
Enumerate through active document occurrences (ActiveDoc.ComponentDefinition.Occurrences)
Once I find the object I'm looking for, I gather information about it including its position, size via bounding box, rotation (calculated via matrix data), ect, ect..
I have attached two images that show a couple of things. The first image shows I have selected the occurrence and to verify my suspicion, output the components of the vector to a dialog box. There you see
X=462
Y=58.551
Z=7.17 <= THIS IS NOT CORRECT..
Also on image one, you can see when I measure from the components origin point to the assembly origin point, I get the correct values.
Now, I created a breakpoint to inspect the output of ComponentOccurrence.Transformation.Translation
which you can see in image two. The return value on the Z component is -1.82 with a large amount of significant figures which is NOT correct..
Anybody know what's going on? The measure tool is obviously able to obtain the correct data.. So where is it getting the component position from if not the transformation matrix?
any help would be greatly appreciated.. this has brought me to a complete halt programming wise..
THANK YOU!
Solved! Go to Solution.