The Global ARCHICAD Community

Stay informed. Get help. Share your knowledge.

Everything about GDL - Doors/Windows/Objects/Stairs etc. (Example: I created an object that prints an error message in 3D all the time, please help!)

Moderators: Karl Ottenstein, LaszloNagy, ejrolon, Barry Kelly, gkmethy, Gergely Feher

#296931
Hi everyone,

I have an object that have an inline defines material.

But it happens that I need the index of that inline defined material so that I can use it with tube{2} command, since that when that material name was called (either by scripting it's name or by the a ind(material, inline_defined_material) ) didn't work, but with other loaded material it worked just fine.

How should I proceed ?
#296933
Since the material index is managed only project-wide, a locally defined material also does not receive an index. It can then only be set with its plain text. The IND () function does not provide any material.
With IND (), only materials that are globally available and therefore have an internal index can be queried. Locally defined materials provide the index -1, so not available.
#296976
@Piotr

Well I tried two ways, first by putting the name of the inline material name and the second by trying to get it's index using IND().

Both have failed.

The third way didn't produce an error code, but it became transparent.

So how can I use inline defined material in tube{2} command ??
#297159
Easy way to check if the command works with inline materials is to place in the edge material the index -2...
(of material).
Of course You have to have at least 2 inline defined materials.
Why not -1: well it looks that even the commands not working with inline materials do actually work with -1 (the first defined inline)

So if Your object neeeds 1 (only one) inline defined material - it will probably work with all even the older commands.

Piotr