- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
I am a new in writing code. And I use AI to write this one. Here are my requests:
Environment: CAD2020 & TArchT20V5(a second development software based on cad)
1. support the queries of TEXT, MTEXT, TCH_TEXT, TCH_LEADERTEXT
2. after running the command, it can filter the others objects and keep the above objects only.
3. search the contents and sort them out.
4. extract the numbers only and sum them up. Follows the rules below
a. when there are spaces in the contents, extract the first number after the first space and classify the numbers into the category with the name as the contents before the space.
b. when there is no space in the contents, extract the first number and classify the numbers into the category with the name as the contents before the number.
c. when there are no characters before numbers, extacrt the first number and classify them into one category with with the name as null.
5. feedback the result in the command lines.
notes: all the contents obey the following writing format
A 20m2
A20M2
A 20
A20
for example, there are text objects bellow
AAA 20M
BBB60M
aaa 10m2
AAA50m2
80m
after running the programm, I hope get the result like this
AAA 70
BBB 60
aaa 10
null 80
I test the code and it can sellect the right objects like:
mao 10
mao10
jing 10m2
测试10m2
jing10m2
测试 10m2
but I got the wrong result which can't classify correctly, like
ma 80
Please Help.
Solved! Go to Solution.