We value your input!
Please participate in Archicad 28 Home Screen and Tooltips/Quick Tutorials survey

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

Define Image Fill HELP!?

JGoode
Expert
Hi, I need to script an image fill into my object but I am not sure how to use the define image fill code. Any examples would be very helpful!

Thanks
ArchiCAD 23

Windows 10
13 REPLIES 13
Barry Kelly
Moderator
JGoode wrote:
Even though my 2D image doesn't show it, the preview still shows strange patterns at 255. All I want is a solid fill. Any idea what numbers to use?
I am not quite sure what you mean by this - can you post a screen shot?

The 'pattern' numbers only affect the bitmap image of the fill and if all are '255' you will get a solid bitmap image - as in the attached image.
DEFINE IMAGE_FILL "pink" "Flowers.jpg", 
 255, 255, 255, 255, 255, 255, 255, 255, 
 0.321, 0.485, 0, 0
For some reason if all pattern values are set at zero (should be an empty fill) one line remains solid in the preview.


Barry.
One of the forum moderators.
Versions 6.5 to 27
i7-10700 @ 2.9Ghz, 32GB ram, GeForce RTX 2060 (6GB), Windows 10
Lenovo Thinkpad - i7-1270P 2.20 GHz, 32GB RAM, Nvidia T550, Windows 11
JGoode
Expert
Barry wrote:
JGoode wrote:
Even though my 2D image doesn't show it, the preview still shows strange patterns at 255. All I want is a solid fill. Any idea what numbers to use?
I am not quite sure what you mean by this - can you post a screen shot?

The 'pattern' numbers only affect the bitmap image of the fill and if all are '255' you will get a solid bitmap image - as in the attached image.
DEFINE IMAGE_FILL "pink" "Flowers.jpg", 
 255, 255, 255, 255, 255, 255, 255, 255, 
 0.321, 0.485, 0, 0
For some reason if all pattern values are set at zero (should be an empty fill) one line remains solid in the preview.


Barry.
This is with everything set a 0. It's the clearest I could get it.
[/img]
screenshot.jpg
ArchiCAD 23

Windows 10
Barry Kelly
Moderator
So those dots behind the text is supposed to be the fill?
It doesn't appear to be loading your image file.

I was having trouble with this if defined in an object.
I think it is best to define in a MATER_GDL object ( i.e. simply an object named "MASTER_GDL_fills").
These are loaded first when your library loads and then the fill will be available in Archicad in the fill tool and to all other objects in their parameters.
You will have to manually re-load the library after creating the MASTER_GDL object for it to load.

Personally I would just create the image fill in the fill settings and use the Attribute Manager to save it as an AAT file that you can import into any other file.

Barry.
One of the forum moderators.
Versions 6.5 to 27
i7-10700 @ 2.9Ghz, 32GB ram, GeForce RTX 2060 (6GB), Windows 10
Lenovo Thinkpad - i7-1270P 2.20 GHz, 32GB RAM, Nvidia T550, Windows 11
JGoode
Expert
Still having problems with this. For some reason I get a dashed line across my 2D object. Even though in my object I set everything to 255, the "Screen-only Pattern" in the Element Attributes section isn't full. I can't workout why this is. No Idea why. Even on some of my other fills even though they appear as solid in both plan and in the "Screen-only Pattern" the preview shows a dashed line. It isn't a big problem as they appear as solid in the actual plan view but it's a bit confusing in the preview. The image fill doesn't actually show in the preview either for some reason however it shows the dashed line that develops from it.
define image_fill 'black' "Black_Image_Fill",
        255, 255, 255, 255, 255, 255, 255, 255,
        0.001, 0.001, 0, 0

EDIT: No dashed line however, the image fill does not appear in the preview.

EDIT:
		FILL "red"
		poly2_b{5}      12,      3,      0,      3,     220,    220, 
						   0,            0,            1,            0,            0,            1,            0, 
				0.003011396909279, -0.012,      0, 
				0.008011396909279, -0.012,    900, 
						   0,          180,   4000, 
				0.008011396909279, -0.012,    900, 
						   0,          180,   4000, 
				0.003011396909279, -0.012,     -1, 
				0.01201139690928, -0.012,      0, 
				0.008011396909279, -0.012,    900, 
						   0,         -180,   4000, 
				0.008011396909279, -0.012,    900, 
						   0,         -180,   4000, 
				0.01201139690928, -0.012,     0
This bit of code shows the intended image fill (FILL "red") on plan but only shows "220" which is an archicad red in every preview. It's very odd.
ArchiCAD 23

Windows 10