I think there is a small bug with material type indexes in the API.
If you create materials with different types (iso, orthotropic2D, ortho3D...etc...) and try to add them to a set using the corresponding rule, it doesn't seem to work without a "+1" offset, as shown below:
Dim mSet As femap.Set Set mSet = App.feSet mSet.AddRule(FMT_ISOTROPIC+1,FGD_MATL_BYTYPE) mSet.Debug
I've checked with other types as well.
It isn’t a bug. You are using the material type macro when going to group rules…I know it makes sense, but it wasn’t intended for those. The Material Type definitions are not the same as the group rules defintions in FEMAP. Now here's some internal FEMAP talk from George "Those types are offset by 1 because we don’t like putting 0’s into action lists."
With .AddRule, you'll have to use the Rule Macros for Material selection