The Global ARCHICAD Community

Stay informed. Get help. Share your knowledge.

GDL language and objects, API, Add-ons, Script…

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

What's your opinion about this wish?

Essential (5)
3
38%
Important (4)
1
13%
Average (3)
No votes
0%
Not important (2)
1
13%
Not needed (1)
3
38%
By JGoode
#271351
On multiple occasions now it would have saved a lot of time and bugs if it was possible to be able to define pen colours in GDL script. Surely if you're able to define fills and you can define pens for pen sets then it must be possible to define pens using GDL. I feel like this should be possible but it isn't. Thoughts?
By DGSketcher
#271375
Why do you need to define the pen colour? AC's options on pens is ridiculously complex as it is. If you are defining a custom pen in GDL what about the line weight, how will AC know how to display it?

If you are just trying to simplify your pens for consistency then I am a big fan of Graphic Overrides and a single pen set.
By JGoode
#271397
DGSketcher wrote:Why do you need to define the pen colour? AC's options on pens is ridiculously complex as it is. If you are defining a custom pen in GDL what about the line weight, how will AC know how to display it?

If you are just trying to simplify your pens for consistency then I am a big fan of Graphic Overrides and a single pen set.
The first example I can think of is 2D symbols. If they have to be a specific colour to suit standards of some sort, it would be much easier to define the pen colour for whenever that object is used rather than having to change pen sets about and have colours that won't be used all of the time. I have had to resort to using image fills which are okay until the MVO's starts changing around and it isn't no longer showing the image fill but it will show the background/foreground pen. Which is where is would be very useful. If you can define image fills then why not be able to define pens. It's extremely useful if you need it and not an inconvenience if you don't.
By DGSketcher
#271398
Have a look at the GOs, it looks ideal for your problem. You can create a rule that would modify the display of your symbol object using layer and/or name to filter the symbol and display with pens and fill to suit.

I guess this won't work if you need to use multiple different pens in your symbol but then again I would ask why so many colours? You can read this text without multiple colours, so simply highlighting your objects so they are identifiable and readable on your drawings e.g. electrical / fire symbols in red with a white fill background on a black & white drawing should enough to convey what is required?

Just trying to help!
By JGoode
#271399
DGSketcher wrote:Have a look at the GOs, it looks ideal for your problem. You can create a rule that would modify the display of your symbol object using layer and/or name to filter the symbol and display with pens and fill to suit.

I guess this won't work if you need to use multiple different pens in your symbol but then again I would ask why so many colours? You can read this text without multiple colours, so simply highlighting your objects so they are identifiable and readable on your drawings e.g. electrical / fire symbols in red with a white fill background on a black & white drawing should enough to convey what is required?

Just trying to help!
The current object I'm working on has a need for 4 different colours as it includes multiple variations of the object. It's not the most important thing needed in ArchiCAD I agree, however it would be extremely useful and I can see myself having to create similar objects again.
User avatar
By Barry Kelly
#271424
JGoode wrote:...Surely if you're able to define fills and you can define pens for pen sets then it must be possible to define pens using GDL....
You can define a fill in GDL but you can't define a pen for a pen set.
You can set the pen number to be used - but that is all.

However I could see the need to be able to set the RGB colour and thickness of a user definable pen (that is not part of a pen set) so that could be used in an object.
Then regardless of the pen set chosen that pen colour would never change in the object (unless altered in the parameter settings).

Zones already have an RGB pen colour that is not part of the pen sets.
If you save a zone as an object you will get an strange pen number (i.e. 1008) and it will just appear white (with an error message to say pen exceeds range) rather than the original zone colour (at least it does for me).
But there is no way to define this pen colour - which would be nice.

Barry.
By JGoode
#271447
Barry Kelly wrote:
JGoode wrote:...Surely if you're able to define fills and you can define pens for pen sets then it must be possible to define pens using GDL....
You can define a fill in GDL but you can't define a pen for a pen set.
You can set the pen number to be used - but that is all.

However I could see the need to be able to set the RGB colour and thickness of a user definable pen (that is not part of a pen set) so that could be used in an object.
Then regardless of the pen set chosen that pen colour would never change in the object (unless altered in the parameter settings).

Zones already have an RGB pen colour that is not part of the pen sets.
If you save a zone as an object you will get an strange pen number (i.e. 1008) and it will just appear white (with an error message to say pen exceeds range) rather than the original zone colour (at least it does for me).
But there is no way to define this pen colour - which would be nice.

Barry.
Sorry, I phrased it incorrectly. I meant that you can choose pens from a pen set. Defining RGB pens would be extremely useful in my opinion.
User avatar
By LaszloNagy
#271476
If I remember correctly this whole Pen thing in ARCHICAD originated in the age of Pen Plotters, maybe this is why they came to be called Pens (just guessing). And maybe this is why a Pen defines both the Color and the Width, because specific Pens in Pen Plotters always had specific thicknesses.
Pens differ from other types of attributes such a Line Types, Fill Types, etc. in that there is always a set number of Pens (from 1 to 255).

I agree with the wish, but I think the way Pens are handled would have to be completely overhauled. I think the best thing would be to have the ability to define as many Pens (or Colors?) as needed (by specifying RGB values), and we should also have the ability to define Line Thicknesses, so Color and Thickness would be two separate settings for elements. This may even make the need for Pen Sets obsolete. Just thinking loudly...
By DGSketcher
#271500
The problem I see with it comes when the object is used beyond the originator. Somebody will have an issue with the pen colour and/or pen weight in which case they will be looking to change those values, which is how things work just now with pens & pen sets. If you can't change the values then use of the object may be limited. Where the colours of the object are critical then perhaps using images would be a more reliable solution.
By JGoode
#271758
DGSketcher wrote:The problem I see with it comes when the object is used beyond the originator. Somebody will have an issue with the pen colour and/or pen weight in which case they will be looking to change those values, which is how things work just now with pens & pen sets. If you can't change the values then use of the object may be limited. Where the colours of the object are critical then perhaps using images would be a more reliable solution.
The image fills aren't very reliable due to the model view options. Being able to set the background and foreground on different symbols means that there is a lot more flexibility with the MVO's. The idea of defining pens is that they are precise to a colour. There wouldn't be a case where the user of the object would be changing the pen. Company logo's are a good example of a use as most company's will have a specific colour for their logo and it is unlikely that you would want it in a pen set 24/7 unless it was your own company's logo.