The Siemens Community Catalyst program was co-created with our community to acknowledge technology leaders who consistently contribute to the Siemens Community. Nominations are accepted on a rolling basis.
Hello!
I would like to create many components out of many sets. The elements should be moved to the new component and the created component should have the same name as the set.
Is that possible?
Thanks
<?xml version="1.0" encoding="UTF-8"?>
Try my code:
*createmarkpanel sets 1 'Select sets ' set set_ids [hm_getmark sets 1] *clearmark sets 1 foreach id [lsort $set_ids] { set name [hm_entityinfo name sets $id] *createentity comps name=$name *createmark elems 1 'by set id' $id *movemark elements 1 '$name' *clearmark elems 1 }
HTH,
Thank you very much!
But I think there is a problem in the While Loop. Hypermesh reports the Error: Please specify a valid collector name.
I've tried the code without the line *movemark elements 1 '$name' and all the components were created fine with the right name.
So the problem must be the move command in the code.
I am working with HW 14.
That´s the Log:
0 while executing '*movemark elements 1 '$name'' ('foreach' body line 5) invoked from within 'foreach id [lsort $set_ids] { set name [hm_entityinfo name sets $id] *createentity comps name=$name *createmark elems 1 'by set id' $id *movemark ...' (file 'C:/Users/censored/Desktop/test.tcl' line 5) invoked from within 'source {C:/Users/censored/Desktop/test.tcl}' ('uplevel' body line 1) invoked from within 'uplevel #0 'source {$file}'' (procedure '::HM_Framework::p_FileLoad' line 68) invoked from within '::HM_Framework::p_FileLoad 24' (menu invoke)
Thank you!
oooh, i think the problem could be my fault!
Because I fear that it could be that some elements are in more than just one set are deposited.
Is it possible to add to the move line, that the elements should be duplicated?
.
I ask for help!
Thank you
Join us for a community conversation on how High-Performance Computing (HPC) and Simcenter PSIM work together to meet the increasing demands of modern power electronics simulation. During this one-hour technical session, you'll discover how leveraging HPC can speed up simulations, improve scalability, and empower engineers…
Join us for a community conversation on accelerating your motor simulation workflow with Simcenter Simlab. In this beginner-friendly session, we'll introduce the platform's automated model-building capabilities and show how easy it is to set up your first electric motor analysis. You'll see the basic steps of geometry…
Join us for a Community Conversation where we'll discuss practical approaches to analyzing complex electromagnetic models using hybrid solver techniques. This session will provide a general overview of how different computational methods can be combined within a single simulation to address models containing varied…