Hello,
I want to use the API to create some beam elements and to assign all elements that have been created to a certain layer. But besides of creating beams, the feature also creates curves and nodes, which I cannot access.
Below you can find simplified code to get a better understanding:
'Create layer
Set TestLayer = Synergy.LayerManager.CreateLayerByName ("Test Layer")
'Prepare beam creation
Set Vector = Synergy.CreateVector()
Vector.SetXYZ 0, 0, 0
Set Vector_1 = Synergy.CreateVector()
Vector_1.SetXYZ 0, 0, 150
Set MeshEditor = Synergy.MeshEditor()
Set Prop = MeshEditor.FindProperty(40420, 1)
'Create beams -> Output: EntList with created beam elements
Set EntList_Beams = MeshEditor.CreateBeamsByPoints(Vector, Vector_1, 10, Prop)
'Assign beam elements to layer
Synergy.LayerManager.AssignToLayer EntList_Beams, TestLayer
So far, everything works fine.
As the code shows, the return of CreateBeamsByPoints is a EntList with created beam elements, which makes it very easy to assign them to a layer. Unfortunately the curves and nodes which are created during this process as well, are not part of this EntList.
Do you have an idea how to get a EntList with these curves and nodes?
Thanks in advance for your support and
best regardes
Jochen
Hello @_JoThu_ ,
I think you could create a layer and make it active. So the new end nodes should be created in the active layer.
Here is a workflow that might help:
EntList.SelectFromString "N18 N23"
Set Predicate1 = PredicateManager.CreateLabelPredicate("N23:N100") EntList.SelectFromPredicate Predicate1
I wish you fun and success with your programming task.
Hello @M.Brassel ,
thanks for giving me a new approach to solve this.
I will test it and come back to you.
Can't find what you're looking for? Ask the community or share your knowledge.