There are limitations about the usage of SYMB_POS_X and SYMB_POS_Y. Both are 0 if you are in GLOB_CONTEXT=5. Unfortunatly the PARAMETERS-statement works normally only if GLOB_CONTEXT=5. What's new for me is, that obvisiously there is a situation, when PARAMETERS do work and the both parameters have the correct value. It has to be in Floor plan situation, but I have no idea how to check this situation by environment parameters.
I have changed your script to store all global position parameters separete:
HOTSPOT2 0, 0, 01
HOTSPOT2 a, b, 02
DEFINE STYLE "oben" Arial, 3, 8, 0
DEFINE STYLE "unten" Arial, 3, 2, 0
IF GLOB_CONTEXT>1 AND GLOB_CONTEXT<5 THEN
PARAMETERS ePOSx=SYMB_POS_X, ePOSy=SYMB_POS_Y, ePOSz=SYMB_POS_Z
ENDIF
STYLE "oben"
TEXT2 a/2, b/2, STR("%m", SYMB_POS_X)+"/"+STR("%m", SYMB_POS_Y)+"/"+STR("%m", SYMB_POS_Z)
STYLE "unten"
TEXT2 a/2, b/2, STR("%m", ePOSx)+"/"+STR("%m", ePOSy)+"/"+STR("%m", ePOSz)
I have loged the environment parameters when object is inserted into plan:
[log-format: time•script-type•context•global parameter•local parameter]
Selection in Object dialog box:
08:47:46 • Parameter-Script • Settings • SYMB=0,000/0,000/0,392 • ePOS=0,000/0,000/0,000
08:47:46 • Interface-Script • Settings • SYMB=0,000/0,000/0,392 • ePOS=0,000/0,000/0,000
08:47:46 • Interface-Script • Settings • SYMB=0,000/0,000/0,392 • ePOS=0,000/0,000/0,000
08:47:46 • 2D-Skript-Script • Settings • SYMB=0,000/0,000/0,392 • ePOS=0,000/0,000/0,000
Built 2D view after closing dialog:
08:47:48 • 2D-Skript-Script • Floor-plan • SYMB=0,773/0,000/0,392 • ePOS=0,000/0,000/0,000
08:47:48 • Parameter-Script • Settings • SYMB=0,000/0,000/0,392 • ePOS=0,000/0,000/0,000
08:47:48 • Parameter-Script • Settings • SYMB=0,000/0,000/0,392 • ePOS=0,000/0,000/0,000
08:47:48 • Parameter-Script • Settings • SYMB=0,000/0,000/0,392 • ePOS=0,000/0,000/0,000
08:47:48 • Parameter-Script • Settings • SYMB=0,000/0,000/0,392 • ePOS=0,000/0,000/0,000
Resizing the object:
08:48:00 • 2D-Skript-Script • Floor-plan-Edit • SYMB=0,773/0,000/0,392 • ePOS=0,000/0,000/0,000
08:48:00 • 2D-Skript-Script • Floor-plan-Edit • SYMB=0,773/0,000/0,392 • ePOS=0,000/0,000/0,000
08:48:00 • 2D-Skript-Script • Floor-plan • SYMB=0,773/0,000/0,392 • ePOS=0,000/0,000/0,000
08:48:00 • 2D-Skript-Script • Floor-plan-Edit • SYMB=0,773/0,000/0,392 • ePOS=0,000/0,000/0,000
08:48:00 • 2D-Skript-Script • Floor-plan-Edit • SYMB=0,773/0,000/0,392 • ePOS=0,000/0,000/0,000
08:48:00 • 2D-Skript-Script • Floor-plan • SYMB=0,773/0,000/0,392 • ePOS=0,000/0,000/0,000
08:48:00 • 2D-Skript-Script • Floor-plan-Edit • SYMB=0,773/0,000/0,392 • ePOS=0,000/0,000/0,000
08:48:00 • 2D-Skript-Script • Floor-plan-Edit • SYMB=0,773/0,000/0,392 • ePOS=0,000/0,000/0,000
08:48:00 • 2D-Skript-Script • Floor-plan • SYMB=0,773/0,000/0,392 • ePOS=0,000/0,000/0,000
08:48:00 • 2D-Skript-Script • Floor-plan-Edit • SYMB=0,773/0,000/0,392 • ePOS=0,000/0,000/0,000
08:48:00 • 2D-Skript-Script • Floor-plan-Edit • SYMB=0,773/0,000/0,392 • ePOS=0,000/0,000/0,000
08:48:00 • 2D-Skript-Script • Floor-plan • SYMB=0,773/0,000/0,392 • ePOS=0,000/0,000/0,000
08:48:00 • Parameter-Script • Floor-plan • SYMB=0,773/0,000/0,392 • ePOS=0,000/0,000/0,000
08:48:00 • Parameter-Script • Floor-plan • SYMB=0,773/0,000/0,392 • ePOS=0,773/0,000/0,392
08:48:02 • 2D-Skript-Script • Floor-plan-Edit • SYMB=0,773/0,000/0,392 • ePOS=0,000/0,000/0,000
08:48:02 • 2D-Skript-Script • Floor-plan-Edit • SYMB=0,773/0,000/0,392 • ePOS=0,000/0,000/0,000
08:48:02 • 2D-Skript-Script • Floor-plan • SYMB=0,773/0,000/0,392 • ePOS=0,000/0,000/0,000
08:48:02 • Parameter-Script • Floor-plan • SYMB=0,773/0,000/0,392 • ePOS=0,000/0,000/0,000
08:48:03 • Parameter-Script • Floor-plan • SYMB=0,773/0,000/0,392 • ePOS=0,773/0,000/0,392
08:48:03 • Parameter-Script • Floor-plan • SYMB=0,773/0,000/0,392 • ePOS=0,773/0,000/0,392
08:48:03 • Parameter-Script • Floor-plan • SYMB=0,773/0,000/0,392 • ePOS=0,773/0,000/0,392
08:48:03 • Parameter-Script • Floor-plan • SYMB=0,773/0,000/0,392 • ePOS=0,773/0,000/0,392
08:48:03 • Parameter-Script • Floor-plan • SYMB=0,773/0,000/0,392 • ePOS=0,773/0,000/0,392
08:48:03 • 2D-Skript-Script • Floor-plan • SYMB=0,773/0,000/0,392 • ePOS=0,773/0,000/0,392
08:48:03 • Parameter-Script • Settings • SYMB=0,000/0,000/0,392 • ePOS=0,773/0,000/0,392
08:48:03 • Parameter-Script • Settings • SYMB=0,000/0,000/0,392 • ePOS=0,773/0,000/0,392
My goal is to store the global position of an object in the moment it is placed in floor plan. This position may never change afterwards! For this I do not see a way. Do you?
Funny thing beside: SYMB_POS_Z has ALWAYS a correct value!