I have created a very simple GDL object. It currently only contains a 2D script that allows the user to modify a couple of points using hotspots:
FOR i=1 TO VARDIM1(points) STEP 1 _id = i * 6 HOTSPOT2 points[i], 0, i+0, points[i], 1 + 128 ! BASE HOTSPOT2 points[i], 0, i+1, points[i], 3 ! REFERENCE HOTSPOT2 points[i], points[i], i+2, points[i], 2 ! MOVING HOTSPOT2 0, points[i], i+3, points[i], 1 + 128 ! BASE HOTSPOT2 0, points[i], i+4, points[i], 3 ! REFERENCE HOTSPOT2 points[i], points[i], i+5, points[i], 2 ! MOVING IF i < VARDIM1(points) THEN LINE2 points[i], points[i], points[i+1], points[i+1] ENDIF NEXT i
Then i save the object to disk File -> Libraries and Objects -> Save Selection as... -> Object
(Selecting browse instead of embedded library)
When opening the saved .gsm file again the 2D script has changed (compared to the code that I posted above):
! ! Name : test.gsm ! Date : Saturday, June 18, 2022 ! Version : 25.00 ! Written by Archicad ! mul2 A/13.599278, B/5.216145 add2 29.01578502415, -36.78886568381 drawindex 10 pen penAttribute_1 set line_type lineTypeAttribute_1 add2 -30.01578502415, 35.78886568381 DIM tmp_points tmp_points = 1 tmp_points = 1 tmp_points = 4.205397216681 tmp_points = 6.216144840519 tmp_points = 14.59927750822 tmp_points = 1.3551285825 call "road", PARAMETERS A = 1, B = 1, ZZYZX = 1, AC_show2DHotspotsIn3D = 1, ac_bottomlevel = 1, ac_toplevel = 0, points = tmp_points del 1
How can i tell Archicad not to mess with the scripts (2D in this case) when the object is saved to disk?
Solved! Go to Solution.
Is this 2D script replacement when saving to the embedded library reproducible? The script you show is an auto-script typically generated by dragging 2D content into the 2D script window of the object... but definitely a bug if anything causes your own scripts to be replaced.
Yes, you have saved an already existing object as an object, so what you will find in that 'saved' object, it will be 'CALL'ing your original object.
Yes, you just need to go to the Library Manager and save a copy of you object from the embedded library to an external folder.
Or when you initially create the GDL and 'save' for the first time, you can choose to brows for a folder to save it in rather than the embedded library.
That folder will need to be a loaded library folder for you to be able to use the object.