
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
I am currently creating a macro which can add a "φ (FAI)" symbol at the start of a dimension, with a integer being inputted to represent how many of the same circle exist.
e.g. 3-φ6.000 = There a 3 circles, each with a diameter of φ3.000
The complete code I have is:
^C^C^P_userr1;0;_userr1;_non;\$m=$(if,$(getvar,userr1),_dimoverride;_dimpost;$(getvar,userr1)-%%c<>;;,_dimoverride;_dimpost;%%c<>;;)_single;^P
which works fine.
The problem I'm having is with the next code which adds full-width brackets on both sides. ( Full-width= (), half width = () )
which is as follows:
^C^C^P_dimoverride;dimpost;(<>);;single;^P
this, again works fine.
but the problem I've been having is that bracket code doesn't add but replaces the system variable with the brackets even if the φ symbol exist. Where as I want the φ symbol to stay with the brackets.
I.E: What I want: 3-φ6 --> (3-φ6)
What I get: 3-φ6 ----> (6)
How do I get the code to check the current system variable of a dimension has a φ symbol or not.?(If any other variable can be replaced with the brackets.)
Also, is a double If function OK in these kind of code?
Any help would be greatful.
Thank you.
Solved! Go to Solution.