Message 1 of 3
Create Beams using the API
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
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