Hello @jrpmedia,
Welcome to the Plugin Café forum and the Cinema 4D development community, it is great to have you with us!
Getting Started
Before creating your next postings, we would recommend making yourself accustomed with our Forum and Support Guidelines, as they line out details about the Maxon SDK Group support procedures. Of special importance are:
About your First Question
Please excuse delayed answer.
The reason for the syntax errors is in using nonexistent type constant, it should be c4d.Omgcloner.
The way you described your goal can be interpreted in different ways resulting in different approaches. Please try to give more details to decrease the amount of ambiguity in your next postings. We've also reformatted your posting, please try using formatting "code" block for when pasting code snippets.
If you like to export the child reference objects from your cloner, then your code snippet would work just fine. The last missing piece there would be exporting children individually. For that I can recommend an approach to create a new BaseDocument, copy your child over to there using GetClone() and then export this document using c4d.documents.SaveDocument(). You should, however, be careful with such approach as cloning objects can have side effects due to dependencies they have, AliasTrans might be something of interest for you in this scenario.
If you on the other hand, want to export actual objects generated by cloner, then you can try making use of MCOMMAND_MAKEEDITABLE command. Please find the snippet showing this approach below. You can also find check there the usage of the aforementioned functions.
Cheers,
Ilia

Code:
import c4d, typing, os
def main(outputDirectory: str):
doc: c4d.documents.BaseDocument = c4d.documents.GetActiveDocument()
# Get the first selected object
currentSelectedObjs: list[c4d.BaseList2D] = doc.GetActiveObjects(c4d.GETACTIVEOBJECTFLAGS_SELECTIONORDER)
if not currentSelectedObjs:
return print("No objects selected.")
# Check if active object is cloner
if currentSelectedObjs[0] is None or currentSelectedObjs[0].GetType() != c4d.Omgcloner:
return print("Please select a Cloner object.")
# Clone document to avoid corrupting original data
docClone: c4d.documents.BaseDocument = doc.GetClone(c4d.COPYFLAGS_NONE)
selectedObjs: list[c4d.BaseList2D] = docClone.GetActiveObjects(c4d.GETACTIVEOBJECTFLAGS_SELECTIONORDER)
if not selectedObjs or selectedObjs[0] is None or selectedObjs[0].GetType() != c4d.Omgcloner:
return print("Something went wrong")
# Bake cloner objects
selectedObj: c4d.BaseList2D = selectedObjs[0]
res: list[c4d.BaseList2D] | bool = c4d.utils.SendModelingCommand(c4d.MCOMMAND_MAKEEDITABLE, [selectedObj])
if not isinstance(res, list) or not res:
return print("Couldn't execute Make Editable command")
# Iterate over baked cloner children
for obj in res[0].GetChildren():
docTemp: c4d.documents.BaseDocument = c4d.documents.BaseDocument()
docTemp.InsertObject(obj.GetClone(c4d.COPYFLAGS_NONE))
filePath: str = os.path.join(outputDirectory, obj.GetName() + '.stl')
print(f'Saving object {obj.GetName()} to {filePath}')
c4d.documents.SaveDocument(docTemp, filePath, c4d.SAVEDOCUMENTFLAGS_DONTADDTORECENTLIST, c4d.FORMAT_STL_EXPORT)
if __name__ == '__main__':
main(r'D:\\temp\\')