Libraries & objects
About Archicad and BIMcloud libraries, their management and migration, objects and other library parts, etc.

GDL: 2D Object Origin

Lingwisyer
Guru

Hi all,

 

Is there a way to set the origin of a 2D object created from the floorplan? I am wanting to add the option of calling a custom symbol, but the origin is always the bottom left no matter the position of the original saved out elements when means it never sits in the corrected location when called.

 

At the moment you have to draw on (0, 0) then edit the generated script removing the ADD2 and MUL2 commands... It would be a lot more user friendly to not need to do the code modification...

 

 

 

Ling.

AC22-23 AUS 7000Help Those Help You - Add a Signature
Self-taught, bend it till it breaksCreating a Thread
Win10 | R5 2600 | 16GB | GTX1660 
10 REPLIES 10
Barry Kelly
Moderator

If you are creating a 2D object from lines and fills in plan, I always move them to the Project Origin before saving as an object.

Place the point you want to use as the default base point position on the Project Origin.

i.e. centre it over the origin if you want the centre as the base point.

Then in the saved object 2D script, remove the first ADD2 command.

Archicad puts this ADD2 in to automatically set the bottom left corner as the base point.

 

Barry.

 

One of the forum moderators.
Versions 6.5 to 27
Dell XPS- i7-6700 @ 3.4Ghz, 16GB ram, GeForce GTX 960 (2GB), Windows 10
Lenovo Thinkpad - i7-1270P 2.20 GHz, 32GB RAM, Nvidia T550, Windows 11
Frank Beister
Advisor

When you develop an object in floor plan and want to save it as an object, you should draw/model the components on the ground floor near the project zero point. You create the handles in 2D with fixed points/hotspots.

When you have placed the finished object, you can select the anchor in the settings dialog in the preview window by a click on the hotspots/cross (anchor = square).

bim author since 1994 | bim manager since 2018 | author of selfGDL.de | openGDL | skewed archicad user hall of fame | author of bim-all-doors.gsm
select the anchor in the settings dialog 

The object is called into another by user definition, so you are locked into what ever the object origin is.

 

@Barry Kelly , yeah... I have put a note mentioning that that is required... It is annoying as the aim was to give an option to people who did not want to script... but hey, opening an object and removing 2 lines seems to be as easy as it will get at this stage...

 

 

Ling.

AC22-23 AUS 7000Help Those Help You - Add a Signature
Self-taught, bend it till it breaksCreating a Thread
Win10 | R5 2600 | 16GB | GTX1660 

Hi Barry

Not sure that works. Changing the script didn't work for me. 

The object even created centred on the AC origin still uses the bottom left as the default placement point.

Just a matter of selecting the centre hotspot in the object dialogue on placement.

Archicad 4.1 to 27 Apple Silicon
you can't build a line
Mac Studio
iPad Pro
iPhone

Even when you delete the automatic ADD2?

AC22-23 AUS 7000Help Those Help You - Add a Signature
Self-taught, bend it till it breaksCreating a Thread
Win10 | R5 2600 | 16GB | GTX1660 

yes ... all that does iso change the position of the object.

It doesn't change the hotspot in the dialogue (as far as I can see)

Archicad 4.1 to 27 Apple Silicon
you can't build a line
Mac Studio
iPad Pro
iPhone

The default hotspot for when you choose a new object I believe is the first hotspot that is defined in the 2D script.

If no hotspots are defined then it will be the origin of the object (0,0).

 

Barry.

One of the forum moderators.
Versions 6.5 to 27
Dell XPS- i7-6700 @ 3.4Ghz, 16GB ram, GeForce GTX 960 (2GB), Windows 10
Lenovo Thinkpad - i7-1270P 2.20 GHz, 32GB RAM, Nvidia T550, Windows 11
David Shorter
Advisor

It  will probably work if you define a moveable hotspot in the 2D script.

There are a number of objects in the library which have default placements in different locations.

So it can be done. 

I haven't tried this solution yet (watching the AO tennis)

Archicad 4.1 to 27 Apple Silicon
you can't build a line
Mac Studio
iPad Pro
iPhone

Are you saying that your object has a single hotspot in the middle, but it is setting the origin to the bottom left? Might you have selected the option to create a bounding box when saving the object?

AC22-23 AUS 7000Help Those Help You - Add a Signature
Self-taught, bend it till it breaksCreating a Thread
Win10 | R5 2600 | 16GB | GTX1660