Hi;
I have groups inside a model that I just can't seem to get to. I can get to all the children through Findchildren, but I just can't get the models to be detected through ex: oModel.Findchildren ("Geo*" ,siGroupFamily) or oModel.Findchildren (, ,siGroupType)
What's the most suitable way of getting to Groups to do something with them which are within a model?
Thanx;
AJ
Group inside a Model
-
EricTRocks
- Moderator
- Posts: 754
- Joined: 25 Nov 2009, 00:41
Re: Group inside a Model
oModel.Groups is a collection
-
jacobo
- Posts: 41
- Joined: 10 Jun 2009, 22:06
Re: Group inside a Model
Thanx Eric. Yet, I just can't seem to get what I want done, which is finding a specific Group under a model, accessing its contents and iterating through them and changing their Render subdiv level. Here's the code:
It's embarrassingly simple, I know, but I just couldn't find a way around it... 
Code: Select all
set oparent = PPG.Inspected(0).parent.parent
set oGroup = oParent.Groups
set GeoGrp = oGroup(10)
Set GeoGrpChld = GeoGrp.FindChildren( , siPolyMeshType )
for each oMember in GeoGrpChld
SetValue oMember&".geomapprox.gapproxmordrsl", 0
next-
EricTRocks
- Moderator
- Posts: 754
- Joined: 25 Nov 2009, 00:41
Re: Group inside a Model
Code: Select all
# Python
parent = PPG.Inspected(0).Parent.Parent
groups = parent.Groups
geoGroup = groups(10) # You can also go groups("groupName")
for eachMember in geoGroups.Members:
# You should make sure there is a local one first
eachMember.LocalProperties("Geometry Approximation").Parameters("gapproxmordrsl").Value = 0
-
jacobo
- Posts: 41
- Joined: 10 Jun 2009, 22:06
Re: Group inside a Model
Eric, you are so very kind to take the time to help out, I appreciate it so much.
God bless and cheers;
AJ
God bless and cheers;
AJ
-
xsisupport
- Posts: 713
- Joined: 09 Jun 2009, 09:02
- Location: Montreal Canada
Re: Group inside a Model
FindChildren finds objects of class X3DObject, and a group is not an X3DObject