Select children of a selected item/hole ( macro )
Select children of a selected item/hole ( macro )
(OP)
Let's assume i have a hole , and a macro that i'ts painting this hole the color i want ( i allready made this ) , now i want to propagate the same color at all the matrix, and function linked to this hole.
Can this be done?
Hole.1
Matrix.1
Macro-color-holes.catscript ( i allready have this )
Read hole dimension.
Assign the hole a color related to the dimension.
Look for matrix (children) of this hole.
Assign the same color of the hole.
How can i implement this routine to this code?
Dim sel As Selection
Set sel = productDocument1.Selection
sel.Search "CATPrtSearch.Thread,all"
Set visPropertySet = sel.VisProperties
visPropertySet.SetRealColor 255,255,0,0
sel.Clear
Dim sel As Selection
Set sel = productDocument1.Selection
sel.Search "CATPrtSearch.Thread,all"
Set visPropertySet = sel.VisProperties
visPropertySet.SetRealColor 255,255,0,0
>> SELECT MATRIX OF THIS HOLE AND ASSIGN SAME COLOR.
selection.Clear
Thanks
Can this be done?
Hole.1
Matrix.1
Macro-color-holes.catscript ( i allready have this )
Read hole dimension.
Assign the hole a color related to the dimension.
Look for matrix (children) of this hole.
Assign the same color of the hole.
How can i implement this routine to this code?
Dim sel As Selection
Set sel = productDocument1.Selection
sel.Search "CATPrtSearch.Thread,all"
Set visPropertySet = sel.VisProperties
visPropertySet.SetRealColor 255,255,0,0
sel.Clear
Dim sel As Selection
Set sel = productDocument1.Selection
sel.Search "CATPrtSearch.Thread,all"
Set visPropertySet = sel.VisProperties
visPropertySet.SetRealColor 255,255,0,0
>> SELECT MATRIX OF THIS HOLE AND ASSIGN SAME COLOR.
selection.Clear
Thanks





RE: Select children of a selected item/hole ( macro )
I'm not a native English speaker, so excuse my question.
In the image bellow you have the Parent/Children of a hole. What does it mean for you matrix? Are you looking to color all holes in a part with same diameter with the same color? Can you give more details?
Regards
Fernando
https://picasaweb.google.com/102257836106335725208 - Romania
https://picasaweb.google.com/103462806772634246699... - EU
RE: Select children of a selected item/hole ( macro )
BTW You're talking about a Hole, but you search for Threads... not same object in CATIA,and your search won't find hole with thread definition included, but will find thread operation applied to Hole, but not the one in the pattern.
When you do Hole with thread definition and Pattern it will also pattern the threads.
When you do Hole (no thread) or Pocket, then Thread it, make sure you select both the Hole and the Thread for Pattern.
now that you have either threaded Hole or Hole/Pocket + Thread, you get the active body and loop all shape and check thepattern.ItemToCopy.
As I am looking into it as I'm coding right now, I can see limitation here as ItemToCopy will return only the first selected object, so in case of Hole/Pocket + Thread, it will not work for you.
So Methodology would be to use only Threaded Hole and not Hole or Pocket + Thread...
Not sure if ThreadAnalysis API i available, or maybe Parent/Children API...
Good luck
indocti discant et ament meminisse periti
RE: Select children of a selected item/hole ( macro )
indocti discant et ament meminisse periti
RE: Select children of a selected item/hole ( macro )
So i really don't need this kind of "differentiation" the software will make this for me , i would just like to know if there is a command to call for children.
Once i have the desired hole selected. I need a comand to select it's linked matrix, like the screen i'v posted.
RE: Select children of a selected item/hole ( macro )
indocti discant et ament meminisse periti
RE: Select children of a selected item/hole ( macro )
RE: Select children of a selected item/hole ( macro )
UPDATE.
I managed to make this work but further consideration i strictly need something from "holes" to they'r "matrix" is there no command for that?
Like there is for products? ( children )