Message 1 of 8
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
I'm looking to create a macro that will grab each manually selected hole feature and extract the x/y/z coordinates of the top of each individual hole. I'm running into two problems
1. I can only make the "FOREACH" selection of the macro work for holes that are selected through the explorer tree. Id like to be able to just select the holes as they're presented on the screen
2. I can't figure out the variable to use to extract the x/y/z location.
REAL XPOS = ''
REAL YPOS = ''
REAL ZPOS = ''
FOREACH $Selected_Hole IN (explorer_selected_entities()) {
IF $Selected_Hole.RootType != "hole" {
MESSAGE INFO "NO HOLES SELECTED"
BREAK
}
// HERE IS WHERE I WOULD LIKE TO EXTRACT THE HOLE LOCATIONS AND UPDATE THE VARIABLES LISTED ABOVE AND USE
// THEM TO TRANSFORM A MODEL
}Any ideas peeps? Once it's up and running properly I'll be happy to post it in it's complete form to the tips and tricks section.
Solved! Go to Solution.