STRING LIST $mymodels = extract(FOLDER('model'),'name')
INT c = INPUT CHOICE $mymodels "SELECT MODEL"
STRING selectedmodel = $mymodels[$C]
EDIT MODEL ALL DESELECT ALL
EDIT MODEL $selectedmodel INTERACTIVE
EDIT MODEL $selectedmodel SELECT ALL
TOOLBAR COMMANDBAR RAISE
CREATE FEATURESET ;
EXPLORER SELECT Featureset "Featureset\1" NEW
ACTIVATE FEATURESET "1" EDIT FEATURECREATE TYPE HOLE EDIT FEATURECREATE CIRCULAR ON EDIT FEATURECREATE FILTER HOLES EDIT FEATURECREATE TOPDEFINE ABSOLUTE EDIT FEATURECREATE BOTTOMDEFINE ABSOLUTE FORM CANCEL FEATURE FORM CREATEHOLE
EDIT FEATURECREATE HOLES COMPOUND OFF
EDIT FEATURECREATE HOLES FIXED ON
EDIT FEATURECREATE HOLES DIRECTION DOWN
EDIT FEATURECREATE MULTAX ON
EDIT FEATURECREATE HOLES OPEN OFF
EDIT FEATURECREATE HOLES CAPPED INCLUDE
EDIT FEATURECREATE HOLES EDITONAPPLY NO
EDIT FEATURECREATE CREATEHOLES
EDIT FEATURESET ; DESELECT ALL
FORM FEATURESELECT
EDIT SELECTION TYPE DRAFT_ANGLE
EDIT SELECTION FILTER DRAFT_ANGLE MIN " 10"
EDIT SELECTION APPLY
FEATURESELECT CANCEL
DELETE FEATURESET SELECTED
FEATURESELECT CANCEL
FORM CANCEL CREATEHOLE
BOOL $err = 0
$err = ERROR $entity("Featureset","").Name
IF $err {
MESSAGE WARN "ACTIVATE A FEATURESET"
RETURN
}
ENTITY $sourceFeatureset = $entity("Featureset","")
EDIT FEATURESET ; DESELECT ALL
REAL LIST diameters = {}
FOREACH $f IN components($sourceFeatureset) {
IF NOT member($diameters,$f.Diameter) {
INT $i = add_last($diameters,$f.Diameter)
}
}
FOREACH $d IN $diameters {
STRING $featuresetName = "DIAMETER "+$d
IF NOT $entity_exists("Featureset",$featuresetName) {
CREATE FEATURESET $featuresetName
}
ACTIVATE FEATURESET $sourceFeatureset
EDIT FEATURESET ; DESELECT ALL
FOREACH $f IN components($sourceFeatureset) {
IF $f.Diameter == $d {
EDIT FEATURESET ; SELECT $f.Name
}
}
EDIT FEATURESET $featuresetName INSERT FEATURESET ; LAST
}
DELETE Featureset "1"
TOOLBAR COMMANDBAR LOWER
EXPLORER SELECT Featureset ROOT
DEBUG EXPLORER KEY RIGHT