ms-structural / ms-structural/femdesign-api
Instance counting mismatch
Nobody has claimed this yet.
- Dominant language
- C#
- Stars
- 51
- Forks
- 29
- PR merge metrics
- No merged PRs in 30d
Description
The instance number should be based on the number of elements with a given identifier to better mimic what FEM-Design does.
Problem
Create a model with 3 bars. 2 with identifier A and 1 with identifier B. Currently their names will be the following in our API:
A.1
A.2
B.3
But when opening the model in FEM-Design they will be renamed to
A.1
A.2
B.1 <-- 1 instead
Solution
Instead of having a private static int _barInstance field we could change it to a dictionary private static Dictionary<string, int> _barInstances.
This dictionary could map the number of instances created of each name. Like this:
{
"A": 2,
"B": 1
}
Testfile in testfolder 638

Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by locating the private static _barInstance field and review the test file in testfolder 638. Verify how instance names are generated for bars with repeated and different identifiers. Done means identifiers such as A produce A.1 and A.2 while a different identifier B starts at B.1, matching FEM-Design.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- csharp
- Domain
- api
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 55/100