Ok, lets give it a try...
Before you do anything go to tools/option and in the knowledge enviroment tab define a path for the architect resource creation path. (this will create a folder structure needed when working with ARM)
Start by creating an UDF that makes a sphere, this udf should have one input and that should be a point, rename the input to "Point". In the last tab "type" hit auto and generate to generate a gscript that will be stored in the folder structure created previously. Now create a catalog, name it ARMCatalog and add the udf feature, create keyword "Logical Name" and set the value to "Sphere" and the keyword "Type" and set the value to "UserFeature". Store both the UDF part and catalog in the folder "knowledgeResourcesCatalogs" which you will find where you defined the knowledge enviroment earlier.
Now to create the knowledge pattern. You can if you want it to be generic to create a part with some points in it so you can define a the pattern and make a power copy that you can use later. In the knowledge pattern window start with creating a new list and call it SphereList. Add the code below:
let i(integer)
let PointList(list)
let ListSize(integer)
let Sphere(UserFeature)
/* Getting all point from Geometrical Set.1 in the list, PointList that will be used to create the UDF on one point at the time and setting the while loop */
PointList='Geometrical Set.1'.Query("Point","")
ListSize=SL->Size()
/* UDF instanciation, in the first line ARMCatalog is the name of the catalog found in the knowledge enviroment folder "knowledgeResourcesCatalogs" Sphere is the feature with the logical name, SphereSet is the name of the geometrical set where the udf should be created. Second line is to map the UDF inout parameter Point to the point on the list*/
i=1
For i while i <=ListSize
{
Sphere=CreateOrModifyTemplate("ARMCatalog|Sphere",SphereSet ,`Relations\KnowledgePattern\SphereList` , i)
Sphere->SetAttributeObject("Point",SphereList ->GetItem(i))
EndModifyTemplate(Sphere)
i=i+1
}
Had to describe it on top of my head so it may not be perfect
