Forum

 
You must be logged in to post Login Register


Register? | Lost Your Password?

Search Forums:


 






Minimum search word length is 4 characters – Maximum search word length is 84 characters
Wildcard Usage:
*  matches any number of characters    %  matches exactly one character

how to add parenthesis to existing numbers

UserPost

10:32 am
February 26, 2010


ngpm515

Member

posts 4

Calvin and Hobbs said:

When you do the append process, change the regular expression from:

:d+\\.:d

to

:d+\\.:d+

You're just adding a “+” to the end. This will handle multiple digits after the decimal.


Wow, thank you so much.  You are the best. Surprised

9:47 am
February 26, 2010


Calvin and Hobbs

Admin

posts 105

When you do the append process, change the regular expression from:

:d+\\.:d

to

:d+\\.:d+

You're just adding a "+" to the end. This will handle multiple digits after the decimal.

5:59 pm
February 25, 2010


ngpm515

Member

posts 4

Thanks so much for your helpful response.  However, the trailing parenthesis is not in the right position for numbers with 2 decimals.  The first parenthesis is perfect.  How should I fix this problem?

Thank you,

Nguyen

Calvin and Hobbs said:

Ok. It can be done with MicroStation. It is a bit on the ugly side.

The easy way to do it is with Global File Changer. This is an Axiom product that will allow you to make all of the changes to all of the right elements in all of your files in one pass.
If you're interested, here it is: http://www.axiomint.com/produc…..hanger.htm 

Here is how to do it with MicroStation:

In order to isolate the correct elements for processing, you have to turn off all levels that would have text that you DON'T want to change. Then fence the file. 

1. Go to Edit|Find\\Replace Text.

2. In the “Find:” field enter:
:d+\\.:d

3. Set “Change:” field to: append

4. In the “With:” field enter: )

5. Toggle on: Reg. Expr.

6. Ensure every other toggle is off.

Make sure you have the levels off that you don't want to process. Make sure you have the fence placed on the whole file.

7. Press <Find>.

8. Press <Change Fence>.

9. Data-click to accept the command.

(This will have added the trailing parenthesis. Now we need to add the first parenthesis)

10. Set ”Change:” field to: prepend

11. In the “With:” field enter: (

(Repeat steps 5-9)

It would be much simpler with Global File Changer. Not only would the steps be simpler, but Global File Changer can process as many files as you want at one time.


2:26 pm
February 25, 2010


Calvin and Hobbs

Admin

posts 105

Ok. It can be done with MicroStation. It is a bit on the ugly side.

The easy way to do it is with Global File Changer. This is an Axiom product that will allow you to make all of the changes to all of the right elements in all of your files in one pass.
If you're interested, here it is: http://www.axiomint.com/produc…..hanger.htm 

Here is how to do it with MicroStation:

In order to isolate the correct elements for processing, you have to turn off all levels that would have text that you DON'T want to change. Then fence the file. 

1. Go to Edit|Find\\Replace Text.

2. In the "Find:" field enter:
:d+\\.:d

3. Set "Change:" field to: append

4. In the "With:" field enter: )

5. Toggle on: Reg. Expr.

6. Ensure every other toggle is off.

Make sure you have the levels off that you don't want to process. Make sure you have the fence placed on the whole file.

7. Press <Find>.

8. Press <Change Fence>.

9. Data-click to accept the command.

(This will have added the trailing parenthesis. Now we need to add the first parenthesis)

10. Set "Change:" field to: prepend

11. In the "With:" field enter: (

(Repeat steps 5-9)

It would be much simpler with Global File Changer. Not only would the steps be simpler, but Global File Changer can process as many files as you want at one time.

5:55 pm
February 24, 2010


ngpm515

Member

posts 4

Calvin and Hobbs said:

I can't think of a GOOD way to do it with Vanilla MicroStation, but it may be possible.

Questions1: Can you post some sample values that are in your files. For example,
all of the values that have to change will have one of the following formats:
99
999
99.0
999.0 

Questions2: What is a unique attribute about the number values in your files? There would have to be something about them that is different than other text values in the file that you could select by. For example, are all of the values you want to change on one specific level? If so you could select all values on that level. Are they color=3. Then you could select by color=3. etc


All of my numbers start with Ex.  The values themselves are very random.  However, I do not want Ex to be included in the parenthesis.

Example: Ex 34.9, Ex 51.2, Ex 62.3,….  I want this: Ex (34.9), Ex (51.2), Ex 62.3,…..

1:52 pm
February 24, 2010


Calvin and Hobbs

Admin

posts 105

I can't think of a GOOD way to do it with Vanilla MicroStation, but it may be possible.

Questions1: Can you post some sample values that are in your files. For example,
all of the values that have to change will have one of the following formats:
99
999
99.0
999.0 

Questions2: What is a unique attribute about the number values in your files? There would have to be something about them that is different than other text values in the file that you could select by. For example, are all of the values you want to change on one specific level? If so you could select all values on that level. Are they color=3. Then you could select by color=3. etc

1:13 pm
February 24, 2010


ngpm515

Member

posts 4

Hello,

I have a lot of existing numbers in my current drawings that I'd like to add parenthesis to all of them. What is the best way to do this?

Thanks

Nguyen


About the MicroStation Tips Forum

Forum Timezone: UTC -4

Most Users Ever Online: 71

Currently Online:
8 Guests

Currently Browsing this Topic:
1 Guest

Forum Stats:

Groups: 3
Forums: 15
Topics: 388
Posts: 556

Membership:

There are 544 Members
There has been 1 Guest

There are 4 Admins

Top Posters:

lorys – 13
diana – 7
noe – 5
dac – 5
Rightofway – 5
ngpm515 – 4

Recent New Members: dedwards04, DjD-567, martin, er.jigneshkumar@gmail.com, Arctic Frost, pdas

Administrators: MicroStation User (275 Posts), Calvin and Hobbs (105 Posts), MicroStation Tips (2 Posts), Hector V (1 Post)



 

Comments are closed.