Developer forum
cancel
Showing results for 
Search instead for 
Did you mean: 

Label in mirrored hotlink

rav668
Participant
Hello,
I would like to ask if there is a function in gdl to check if hotlink in which the object is located has been mirrored. To be more specific I am using wall labels in modules. Without this function, hotlinks are almost useless.
Best regards,
Rafał.
14 REPLIES 14

Laszlo Nagy
Community Admin
Community Admin
No, I don't think there is such a function or command in GDL. A Library Part can know whether it itself is mirrored, but there is no command that would give information about the Hotlinked Module file the Library Part is located in.
I looked through the GDL Reference Guide but I have not found anything that could accomplish this.
....................................................................................................
Laszlo Nagy, Lead Moderator, Community Admin
Get Archicad Tips at https://twitter.com/laszlonagy
AMD Ryzen 1700X CPU, 48 GB RAM, NVidia GTX 1060 6GB, 500 GB NVMe SSD
2x28" (2560x1440), WIN10 PRO ENG, AC20-AC25
Loving Archicad since 1995

rav668
Participant
Thank you for your reply. Unfortunately, I have to label each module manually I suggest Graphisoft creating this function in GDL. It seems very easy to do taking into account the fact, that there is a parameter of hotlink which describes if it is mirrored or not.

Peter Baksa
Graphisoft
Graphisoft
SYMB_MIRRORED combines hotlink mirroring and element mirroring. As a result, it doesn't matter if an object is shown via a hotlink or placed directly into the plan.
Do you need only one component of the mirroring?
Péter Baksa
Software Engineer, Library as a Platform
GRAPHISOFT SE, Budapest

Peter wrote:
SYMB_MIRRORED combines hotlink mirroring and element mirroring. As a result, it doesn't matter if an object is shown via a hotlink or placed directly into the plan.
Do you need only one component of the mirroring?
I have used this in my labels and they work perfectly with hotlinked modules in any position
Creator of Cadswift's parametric GDL libraries
Creator of Infinite Openings and Component Catalogues
Push the envelope & watch it bend
website: https://cadswift.com.au/
YouTube: https://www.youtube.com/user/CADSwift/playlists

Bruce
Booster
Kristian,

Can you expand on that? The GDL reference guide under SYMB_MIRRORED says: The mirrored state of a hotlink is not included

Also, I tried using this in a wall label I'm looking at, and it returns 0 regardless of mirrored state.
Bruce Walker
http://www.brucepwalker.com
https://www.mindmeister.com/65450406

-- since v8.1 --
AC22 6025 INT Full | macOS Mojave 10 | 3.2 GHz Intel Xeon W | 32 Gb RAM | Radeon Pro Vega 56 8 Gb

Bruce
Booster
This is the current result of the label:
Bruce Walker
http://www.brucepwalker.com
https://www.mindmeister.com/65450406

-- since v8.1 --
AC22 6025 INT Full | macOS Mojave 10 | 3.2 GHz Intel Xeon W | 32 Gb RAM | Radeon Pro Vega 56 8 Gb

Peter Baksa
Graphisoft
Graphisoft
Hi Bruce,

I might have overlooked that that you are labelling a wall. Walls don't have a SYMB_MIRRORED state, they use WALL_FLIPPED. This also gets flipped when the hotlink is mirrored.
Also labels don't know which side of the labelled element they are at - I have a feeling that is also missing information you would need. You could try something with LABEL_POSITION and assuming a fixed parallel or perpendicular label orientation. But maybe it is easier to solve with a parameter instead.
Péter Baksa
Software Engineer, Library as a Platform
GRAPHISOFT SE, Budapest

Bruce
Booster
Thanks Peter. Yes, I've added a 'Used in Hotlink' parameter. Haven't got the logic working yet, but so far it's promising.
Bruce Walker
http://www.brucepwalker.com
https://www.mindmeister.com/65450406

-- since v8.1 --
AC22 6025 INT Full | macOS Mojave 10 | 3.2 GHz Intel Xeon W | 32 Gb RAM | Radeon Pro Vega 56 8 Gb

Ignacio
Enthusiast

Anybody got a fix for this problem, with the same label or any other one? This is what I get with NCS Wall Label 24. Right is module placed with no mirroring; left is mirrored, with all wall labels flipped making the whole thing unusable. Screen Shot 2021-09-27 at 10.42.21 AM.png

Hi all, I cant remember exactly how I got it to work and I don't have time to look into it right now but I will play around with it later this week. From memory I used the the wall_direction parameter in conjunction with symb_mirrored.

Sorry @Bruce I didn't see your question earlier, I must have missed the notification some how. I will get a solution for you ASAP as I know I did get it working.

Creator of Cadswift's parametric GDL libraries
Creator of Infinite Openings and Component Catalogues
Push the envelope & watch it bend
website: https://cadswift.com.au/
YouTube: https://www.youtube.com/user/CADSwift/playlists

I used a user-set parameter (hotlink_use) combined with the WALL_FLIPPED AC parameter to get the label to behave correctly:

 

flip = 1
IF hotlink_use & WALL_FLIPPED THEN flip = NOT(flip) 

Bruce Walker
http://www.brucepwalker.com
https://www.mindmeister.com/65450406

-- since v8.1 --
AC22 6025 INT Full | macOS Mojave 10 | 3.2 GHz Intel Xeon W | 32 Gb RAM | Radeon Pro Vega 56 8 Gb

Bruce, could you post that fixed label? I can't understand how that fits into the script, and I don't know whether it is missing lines that should be obvious to anybody but me, or just different parameter or variable names in your label (I would try to fix a USA library label).

 

 I will try to post more info when I have some more time...

Bruce Walker
http://www.brucepwalker.com
https://www.mindmeister.com/65450406

-- since v8.1 --
AC22 6025 INT Full | macOS Mojave 10 | 3.2 GHz Intel Xeon W | 32 Gb RAM | Radeon Pro Vega 56 8 Gb

So, as stated earlier, what you need to do is add a boolean parameter that the user sets.  I have called this "hotlink_use" with the description of "Flip in mirrored hotlink".  Default OFF.

 

With a wall label, you also will probably have a parameter already where the user can choose which side of the wall the label appears.  In my part, this is a length parameter is called "flipmark1" (forgive the naming...I inherited the part), and can have a positive or negative value (a hard-coded distance for the label).

 

In the 2D script, I have a flag variable to use in my ADD2 statements depending on whether the label should be flipped or not.  This is named 'flip'.  I then run a series of tests to offset the label to the correct side of the wall.

 

In the below sample script, "hdepth" is the offset Y coordinate of the label.

 

 

flip = (flipmark1 >= 0)  ! Set flip to 1 or 0

IF hotlink_use & WALL_FLIPPED THEN
   flip = NOT(flip) ! Adjust for mirrored hotlinks (selected by user)
ENDIF

flip = flip-1*NOT(flip)  ! change 0 and 1 to -1 or 1

 

hdepth = A*(GLOB_SCALE/100) * flip

 

ADD2 0, hdepth

 

There will be more to your script, but this is the fundamentals of the transformations I've used.  I hope this has helped.Current.jpgNew.jpg

 

 

Bruce Walker
http://www.brucepwalker.com
https://www.mindmeister.com/65450406

-- since v8.1 --
AC22 6025 INT Full | macOS Mojave 10 | 3.2 GHz Intel Xeon W | 32 Gb RAM | Radeon Pro Vega 56 8 Gb

Still looking?

Browse more topics

Back to forum

See latest solutions

Accepted solutions

Start a new discussion!