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

GDL
About building parametric objects with GDL.
SOLVED!

Object Marker

Anonymous
Not applicable
I have created a object (Switch Board) using morph. It works fine in schematic drawing.
But problem arise when I want to use it at my electrical drawing. Instead of Top view I need to show a bigger symbol and the ID . I don't need the top view in Electrical drawing .
I can show the ID using ID level. But How can I show the Symbol. I have drawn the symbol seperately. But I dont know how to show it in electrical drawing. Thanks in Advance.
1 ACCEPTED SOLUTION

Accepted Solutions
Solution
Anonymous
Not applicable
That all I need to know, Thanks for ur support.

View solution in original post

12 REPLIES 12
Hello avishiplu,

Do you do your object by a Patch or "save the selection as an object" ?
If you are able to understand how to use GDL, I invite you to add a line about ID into your 2D script.
Christophe - FRANCE
Archicad Designer and Teacher
Archicad 15 to 27 FRA FULL

OS 11.6 Big Sur - MacBook Pro 2017 - 16Go RAM
"Quality is never an accident ; it's always the result of an intelligent effort" John Ruskin
Anonymous
Not applicable
Hello Christophe Fortineau,
Thanks for the response. I have no idea about Patch. I created my object "save the selection as an object".
If I am not so wrong u are mentioning "GLOB_ID" . That helps to add a ID with the Object. I used that Previously. To use that I have to create the object along with a text and need to change that text in 2D Scrypt.

I dont want to show ID in my Schematic Drawing. So I felt less interest to do that. I prefer to use ID Level in my electrical drawing. Thus this level dont show up in other drawing.


But my problem lies in Symbol. In electrical drawing I need a symbol instead of Top view of my object. How can I add this?
Hello avishiplu,

A "Patch" is a object made from a marquee selection through the menu "Documentation/Annotation/Create a Patch". It's the simpliest way to draw details you want repeat above your automatic 2d drawings. It deals with a gsm object you can easily modify into 2D symbol tab with archicad drawing tools.

To be able to add parametric values you have to write scripts... Share your object and explain what you need. I'm not a expert but I think I'm able to help you about this project.
Christophe - FRANCE
Archicad Designer and Teacher
Archicad 15 to 27 FRA FULL

OS 11.6 Big Sur - MacBook Pro 2017 - 16Go RAM
"Quality is never an accident ; it's always the result of an intelligent effort" John Ruskin
Anonymous
Not applicable
Dear Christophe Fortineau
Thanks for ur interest for solving this issue. Here is the pln file with a morph and 2D symbol . Here it is the pln file
https://drive.google.com/drive/folders/1zwxMw3TMRrubAFFsv5WdvNoqMMWF38nT?usp=sharing

I want to convert this morph to a object . Thus I can see
- the actual top view in my schematic drawing (plan for clien)
- the 2D symbol I attached in the electrical drawing (plan for electrical engineer)


N.B: I face little difficulties while I was uploading my pln file here.
So I uploaded in my google drive.

Sincerely
Avi Shiplu
Barry Kelly
Moderator
avishiplu wrote:
I want to convert this morph to a object . Thus I can see
- the actual top view in my schematic drawing (plan for clien)
- the 2D symbol I attached in the electrical drawing (plan for electrical engineer)

The problem you will be facing is that you want to show the same object with 2 different plan symbols, depending on what layer combination you have active.
Unfortunately, an object can not detect the layer combination that is currently active.

You have 2 choices that I can see.
Use a separate object for the electrical symbol for your electrical plan.
This is the easiest option if you are not proficient at GDL scripting.


Or how are your GDL skills?
You can use a Library Global variable that can be set to change the 2D view of the object.
The LG variable can be saved with the Model View Option combination - so you can have one MVO for the standard plan and use another MVO for the electrical plan that will force the object to display the electrical version of the object 2D view.
You can create your own LG variables if you know what you are doing, or you can cheat and use an existing MVO option - I see in the template there is already one for "Lighting & HVAC Floor Plan Symbol" which you could possibly use.

Have a look at the script for the 'Recessed Spotlight' object.
In the 2D script you waiil see a CALL for "GetPlanViewGlobals".
Open that macro and you will see in the 2D script the bit that queries the MVO (Library Globales) and returns the setting of that variable to the spotlight object.
reqILSymbol = gs_symbtype_2D_m
if reqILSymbol = PLANSYMB_BY_MVO then
	reqILSymbolTemp = 0
	success = LIBRARYGLOBAL ("LibraryGlobals13", "iLSymbol", reqILSymbolTemp)
	if success > 0 then
		reqILSymbol = reqILSymbolTemp
	else
		reqILSymbol = PLANSYMB_RCP
	endif
endif
end reqILSymbol


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
avishiplu wrote:
Here it is the pln file
The gsm file is enough 😉
Christophe - FRANCE
Archicad Designer and Teacher
Archicad 15 to 27 FRA FULL

OS 11.6 Big Sur - MacBook Pro 2017 - 16Go RAM
"Quality is never an accident ; it's always the result of an intelligent effort" John Ruskin
Anonymous
Not applicable
Barry wrote:


Or how are your GDL skills?

reqILSymbol = gs_symbtype_2D_m
if reqILSymbol = PLANSYMB_BY_MVO then
	reqILSymbolTemp = 0
	success = LIBRARYGLOBAL ("LibraryGlobals13", "iLSymbol", reqILSymbolTemp)
	if success > 0 then
		reqILSymbol = reqILSymbolTemp
	else
		reqILSymbol = PLANSYMB_RCP
	endif
endif
end reqILSymbol


Barry.


Hello Barry,
Although I don't have any knowledge on GDL I prefer the 2nd option. In long run it will save my time.
- Do I need any programming knowledge to develop my GDL skill?
-How long I may take to develop the basic GDL skill for the object I shared ?
avishiplu wrote:

- Do I need any programming knowledge to develop my GDL skill?
No you do not. It deals with a BASIC language like.
avishiplu wrote:

- How long I may take to develop the basic GDL skill for the object I shared ?
If you keep the "GDL Guide" under your eyes you might be able to script your first parametric GDL object after 48 hours. About complex parametric object we all learn everyday since few years about GDL.

The GDL guide : https://gdl.graphisoft.com/reference-guide
Christophe - FRANCE
Archicad Designer and Teacher
Archicad 15 to 27 FRA FULL

OS 11.6 Big Sur - MacBook Pro 2017 - 16Go RAM
"Quality is never an accident ; it's always the result of an intelligent effort" John Ruskin
runxel
Legend
avishiplu wrote:
- Do I need any programming knowledge to develop my GDL skill?
-How long I may take to develop the basic GDL skill for the object I shared ?
Don't be afraid. GDL makes Archicad powerful and understanding it really helps even in the small scale.
Most architects I know dislike "programming", but essentially it is like doing architecture, but in cookbook-style.
(There is a reason why Nicholson-Cole named his influential guide on GDL like that – you'll find copies of that easily on the internet).
Again, don't think of scary programming, but rather of describing things with words.
Lucas Becker | AC 27 on Mac | Author of Runxel's Archicad Wiki | Editor at SelfGDL | Developer of the GDL plugin for Sublime Text | My List of AC shortcomings & bugs | I Will Piledrive You If You Mention AI Again |

POSIWID – The Purpose Of a System Is What It Does /// «Furthermore, I consider that Carth... yearly releases must be destroyed»