2022-03-01 09:50 PM - edited 2022-03-01 09:52 PM
I´m trying to build an electricity socket that is 3D modelled but in floor plan it only shows a 2D symbol with a editable text (for the circuit) and an autotext for its elevation to home stroy.
The idea is, circuit goes above (and it´s a manual input)
Height goes below (it´s basically a height from home story or bottom level maybe)
This is what I have in the 2D script, I just need to know how to call the height in meters please.
paragraph "AC_PRG_13" 1, 0, 0, 0, 1
pen penAttribute_4
set style "AC_STYLE_1"
circuit
endparagraph
paragraph "AC_PRG_14" 1, 0, 0, 0, 1
set style "AC_STYLE_2"
"h:"
"1.2"
" m"
endparagraph
Solved! Go to Solution.
2022-03-02 05:06 AM
Yes, because that is a number and you are using a string in your paragraph.
You can't mix numbers and string values in text.
You need to convert the number to a string ... STR("%m", GLOB_ELEVATION - GLOB_HSTORY_ELEV)
I think that is the correct syntax to convert to a meter value.
Something like that anyway.
Barry.
2022-03-02 02:38 AM
I would script this type of object so that it's origin is at your floor level, in which case you would use zzyzx to offset the object vertically. This value can then be inserted as a parameter where required.
If you are not doing that, you could use
GLOB_ELEVATION - GLOB_HSTORY_ELEV
Ling.
AC22-23 AUS 7000 | Help Those Help You - Add a Signature |
Self-taught, bend it till it breaks | Creating a Thread |
Win11 | i9 10850K | 64GB | RX6600 | Win10 | R5 2600 | 16GB | GTX1660 |
2022-03-02 04:13 AM
Thanks but I tried with GLOB_ELEVATION - GLOB_HSTORY_ELEV and Archicad returns a "string type expression required in line...."
On the other case, how do you set a floor level origin in that case?
2022-03-02 05:02 AM - edited 2022-03-02 08:31 AM
Oh true. Cannot use Autotext in calculations. You would need to use a Request to get usable values...
n = REQUEST ("Story_info", expr, nStories,
index1, name1, elev1, height1 [,
index2, name2, ...])
Corrected by Barry. Getting myself confused between globals and autotexts... even though globals are clearly denoted...
AC22-23 AUS 7000 | Help Those Help You - Add a Signature |
Self-taught, bend it till it breaks | Creating a Thread |
Win11 | i9 10850K | 64GB | RX6600 | Win10 | R5 2600 | 16GB | GTX1660 |
2022-03-02 05:06 AM
Yes, because that is a number and you are using a string in your paragraph.
You can't mix numbers and string values in text.
You need to convert the number to a string ... STR("%m", GLOB_ELEVATION - GLOB_HSTORY_ELEV)
I think that is the correct syntax to convert to a meter value.
Something like that anyway.
Barry.
2022-03-02 06:06 AM - edited 2022-03-02 06:12 AM
-
AC22-23 AUS 7000 | Help Those Help You - Add a Signature |
Self-taught, bend it till it breaks | Creating a Thread |
Win11 | i9 10850K | 64GB | RX6600 | Win10 | R5 2600 | 16GB | GTX1660 |
2022-03-02 06:13 AM
No, they are GLOBAL variables.
Barry.
2022-03-02 01:26 PM
Thanks a lot, It worked!