Incremental PartFamily Naming

Hello

Is it possible to name PartFamilyName in an incremental way. For example, I want to do something similar to what I have shown below:

feature

User.Objects.GetElementsInCell Bentley.GC.Features.Solid

{

Cell = aCell;

PartFamilyName = 'Pier' + Series(0,20,1);

PartName = 'Foundations';

}

The above does not work. I have also tried to write a script, and while it does seem to work for some things it does not always work. I have pasted in the script below.

    feature User.Objects.FoundationDrop Bentley.GC.Features.Solid
    {
        Function                  = function (Cell[] cll)
                                    {
                                    ClearConsole();
                                    
                                        for (int i = 0; i < cll.Count; ++i)
                                        {
                                        
                                                Solid fndDrop = new Solid(this);
                                                fndDrop.FromElementsInCell(cll[i]);
                                                
                                                
                                                fndDrop.PartFamilyName = 'Pier' + i;
                                                fndDrop.PartName = 'Foundations';
                                    
                                                
                                                Print(fndDrop.PartFamilyName);
                                                Print(fndDrop.PartName);
                                                
                                    
                                        }
                                        
                                    };
        FunctionArguments         = {Flatten({Reverse(FoundationCell2),FoundationCell,Reverse(FoundationCell4), FoundationCell3})};
    }
}
The above works sometimes, but in the above example it does not work. The PartFamilyName does not get added to the element. Anyone can see what I am doing wrong?
Parents
  • Hi Michael,
    The minimum requirement would be that the Family and Part names are already defined in your dataset. GenerativeComponents does not insert new family or part definitions into a dataset, it only uses existing ones.
    With the new ABD Add-in GenerativeComponents V8i SELECTseries 6 (v08.11.09.331 and later versions) a node's Part property is now a list containing two strings, the Family and the Part names, e.g. {'Foundations', 'Foundations'}.
    Regards,
    Volker

       

    Answer Verified By: Mueller 

Reply
  • Hi Michael,
    The minimum requirement would be that the Family and Part names are already defined in your dataset. GenerativeComponents does not insert new family or part definitions into a dataset, it only uses existing ones.
    With the new ABD Add-in GenerativeComponents V8i SELECTseries 6 (v08.11.09.331 and later versions) a node's Part property is now a list containing two strings, the Family and the Part names, e.g. {'Foundations', 'Foundations'}.
    Regards,
    Volker

       

    Answer Verified By: Mueller 

Children
No Data