The Global Archicad Community

Stay informed. Get help. Share your knowledge.

Topics specific to the scripting and development of Library Parts and Libraries using Param-O or the Geometric Description Language – GDL. (Example: How do you use “REQUEST” GDL commands?)

Moderators: Karl Ottenstein, LaszloNagy, ejrolon, Barry Kelly, Gordana Radonic, nbalogh, mnguyen, gkmethy, rmasaki, Akos Somorjai, Csilla Mai, Peter Baksa

By scraptrash
#320939
Hi everyone,
I’m trying to write a custom MVO that I can show / hide elements based on their AC classifications or other classifications defined in the element.

My background:
I use both archicad and revit. I don’t know any GDL yet, though I do code in python and C# for Revit.
In archicad, there’re a few ways to hide / show elements I.e. MVO, layers, structure display or in 3D by modelling tool types. I miss Revit’s ability to hide / show elements by categories (similar to archicad classifications). Recently I read custom MVO may be able to achieve this. I also read graphisoft has an official guide on custom MVO.

As starting is always the most difficult part, could anyone help me jump start by say:
- is custom GDL MVO the way to go?
- outline the GDL parts I need to look at (it seems to me that there are several parts in an GDL object when I open one)
- the key functions / macros in GDL I may need to use.
I think I can handle the bolts and nuts of actual GDL codes. I will appreciate any help on the overall outline.
Thanks a lot!!
User avatar
By Kristian Bursell
#320943
Hi scraptrash,

Generally speaking you should definitely explore GDL as it opens so many possibilities, and it is an easy coding language to learn especially if you already code.

For your purpose however GDL and MVO's are not the solution. You use custom MVO's to create a parameter that you want elements to respond to globally. However you also need to code the response, and the link to the MVO value, in the elements that you you want to respond. This works well for your own GDL objects but does not work for Archicad model elements such as Walls, Slabs etc.

As I am purely a GDL expert these days (for the last 15 years) I don't know the exact method you would use but there are other filters for model elements in Archicad. have a look into the Renovation Filter, its pretty flexible once you delve into it. You can reference ID and Category data as well as Properties but i am not sure you will be able to reference the specific value you are using. If not then perhaps consider referencing a value you can access in the renovation filter. Other than the Renovation filter you also have Graphic Overrides. I am not sure which will work best for your process.
User avatar
By Kristian Bursell
#320944
If you are trying to get a response out of GDL objects, which is anything place with the following tools:
- Object tool, of course,
- Railing,
- Curtainwall,
- Door, Window, Skylight & Opening,
- Zone stamps and 2D auto labels,
- Lamp & Equipment (MEP stuff)
- Wall Ends,

then yes custom MVO's are the right method
simple creat a new object and set the Subtype (top right corner on the Details page of the object creation interface) to "Library Global Settings".
Then all you have to do is create parameters in the "Parameters" list (not the parameter script, this is use to set the rules for the parameters in the parameters list) and script the interface to access the parameters in the "Interface" script.
By scraptrash
#320946
Thanks Kristian for your suggestion and that was very helpful.
Kristian Bursell wrote:does not work for Archicad model elements such as Walls, Slabs etc.
So MVO cannot solve my problem.
Kristian Bursell wrote: have a look into the Renovation Filter, its pretty flexible once you delve into it. You can reference ID and Category data as well as Properties but i am not sure you will be able to reference the specific value you are using. If not then perhaps consider referencing a value you can access in the renovation filter.
I'm digesting this suggestion, but I'm not sure what you meant. An element can only have one renovation status. How do you reference ID / Category data / properties to the renovation filter?
Kristian Bursell wrote:Other than the Renovation filter you also have Graphic Overrides.
This was what I think could be the last resort without going into any GDL / API coding. I can override those elements of certain classifications which I don't want to see into transparent background fill colour and pen set to invisible lines (I can create a line type which only has a dot over a very long distance, so in effect, no lines visible at all). This is a workaround and may affect 2D graphics somehow though. Not that elegant.
User avatar
By Kristian Bursell
#320981
I'm digesting this suggestion, but I'm not sure what you meant. An element can only have one renovation status. How do you reference ID / Category data / properties to the renovation filter?
Although elements can only have one renovation status you can set up Renovation Filter schemes to determined how elements are viewed. Though this will probably have the same limitations you have discovered in Graphic Overrides.
So in short there is probably not a perfect answer for your requirement and you may have to go down the custom API path. With your C# experience hopefully this wont be too difficult. Graphisoft provide great support for their API developer community so I think you could have some fun with it. provided you have the time and inclination.
User avatar
By LaszloNagy
#321049
Unfortunately, I will not be able to suggest any solution either that would be as simple as it is in Revit. There actually have been wishes where people were requesting this functionality.
In the 3D Window, you can select elements and you can Isolate them like in Revit (using F5 or the "Show Selection/Marquee in 3D" context-menu command). Hiding them is a bit more convoluted: you can select all, then use SHIFT-click or the Find & Select Palette to remove elements you want to hide, and then Isolate the remaining elements.
However, you can not do the same in other Viewpoint types, only in 3D.

There is also the Graphic Override (View Filter in Revit) route, where you specify criteria, and elements meeting the criteria are overridden with the define scheme. Unfortunately, there is no option to Hide elements meeting the criteria (which I think is possible in Revit). There have been wishes for this functionality as well.

So, people have been wishing for this for a while (and not only people coming from Revit), so let us hope that Graphisoft sooner or later implements such a feature.
By scraptrash
#321084
Thanks all for reply.

I found several posts talking about functions to the same effect in this forum after I posted here.
For everyone's convenience,
e.g.
https://archicad-talk.graphisoft.com/vi ... categories

https://archicad-talk.graphisoft.com/vi ... pi#p285520

i guess this is the wish item:
https://archicad-talk.graphisoft.com/vi ... ty#p298856

so for now, maybe using graphic override is the way to go. Make elements invisible instead of hiding.
User avatar
By vdentello
#322032
kuvbur wrote: Tue Feb 02, 2021 1:05 pm You can hide gdl-objects with MVO by IFC type
Awesome solution!

Yet, we'd have to implement
Code: Select all
call "Filter_by_IFCProp" PARAMETERS ALL RETURNED_PARAMETERS show
if not(show) then end
Before every master or 3D Script. Right?
Hey Graphisoft! There's something to look at for a library update! :mrgreen:
User avatar
By LaszloNagy
#322054
vdentello,

Yes, the solution is great, but there is one problem: it works only for GDL-based element types.
The original poster, however, wants to hide any element type by classification (Walls, Slabs, etc.). So, I think if GRAPHISOFT implements a solution, it should be one that works for all element types, not only element types based on GDL.