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

Global Values for Viewing modes in 3D?

ricki_faris
Contributor
HELP!

I was wondering if anyone knows how to define conditions in GDL based on the current 3D viewing mode (block, wireframe, hidden, or shaded)?? - Yes, I know about the GLOBAL_CONTEXT to determine if the 3D view is active.

Ricki
Graphisoft Certified ArchiCAD BIM Manager
ArchiCAD 25
Windows 10
5 REPLIES 5

Vitruvius
Participant
You can use GLOB_CONTEXT to respond to views, for example:

IF GLOB_CONTEXT = 2 THEN doorswing = 90
IF GLOB_CONTEXT = 3 THEN doorswing = doorswing 3D
IF GLOB_CONTEXT = 4 THEN doorswing = 0

The first will keep the doors open in 2D, the second will open them per the 3D script and the third will close them for Section/Elevations.

Then, in 2D you can then use PROJECT2 to determine whether you want a wireframe, hidden line or shaded view in 2D. Though I'm not sure why you'd want to control the GDL symbol separately from the overall 3D rendering parameters?

Cheers, CAmeron
Cameron Hestler, Architect



AC 24 & 25 (3011) / MacMini i7-8700B @ 3.2 GHz / 32GB Ram / 512GB SSD

LG Ultrafine 4K monitor 22" & 27”

Mac OS 11.6 Big Sur

Matthew Lohden
Newcomer
ricki_faris wrote:
I was wondering if anyone knows how to define conditions in GDL based on the current 3D viewing mode (block, wireframe, hidden, or shaded)??
I don't think there is anyway to detect the 3D view mode within a GDL script (perhaps with API?). Why do you need this?
Matthew Lohden
Consultant, SF CA

MacPro 8core 32GB Radeon 5870
OSX 10.8 Mountain Lion, XP32, Win 7x64

ricki_faris
Contributor
Matthew wrote:
Why do you need this?


For example, I have a library part which is (for simplicity) a CPRISM which has a LOT of vertical edges. I want to place a lot of these objects in the plan, say 100, plus.

I you can control the status value, so for objects which are close to the camera I have defined as being 79 (showing the main edges of the object only). But those objects which are further away, I make the status value 8 - no contours, just the face is visible.

In shaded mode this is desirable because the faces can be seen (there's no need for the edges/contours because they are too small).

However, if I want to view in wireframe or hidden line mode - The distance objects aren't visible! So, if I could query the 3D viewing mode, I could adjust the status value correspondingly. For section/elevation modes, this is not a problem as we have GLOBAL_CONTEXT on our side.

Hope that helps you understand my goals?

Ricki
Graphisoft Certified ArchiCAD BIM Manager
ArchiCAD 25
Windows 10

Matthew Lohden
Newcomer
Now I see what you are getting at.

Is it for performance reasons that you don't just use the 79 status value all the time? I find it hard to imagine that it makes that much difference.
Matthew Lohden
Consultant, SF CA

MacPro 8core 32GB Radeon 5870
OSX 10.8 Mountain Lion, XP32, Win 7x64

ricki_faris
Contributor
Matthew wrote:
Is it for performance reasons that you don't just use the 79 status value all the time? I find it hard to imagine that it makes that much difference.
I did a test with 100 objects, using the Internal 3D engine, with contours on & there was a 10-15% improvement with the status value set to 8.

May be marginal if you expect your 3D view to come up in 10 seconds, but for larger projects (stadiums, multi-level developments, etc) could have its advantages.

I guess at this stage, there is no way to determine if the 3D view is in shaded or hidden (or other) mode. So, as a work-around, I've programmed in a variable to manually set the status value...

Ricki
Graphisoft Certified ArchiCAD BIM Manager
ArchiCAD 25
Windows 10

Didn't find the answer? Start a new discussion

Labels

Still looking?

Browse more topics

Back to forum

See latest solutions

Accepted solutions

Start a new discussion!