Jump to content

DOORS: What is the best way to show them open in some viewports, but closed in others?


Recommended Posts

5 hours ago, hollister design Studio said:

doesn't VW automatically re-render all viewports before publishing?

 

Only if you ask it to (by checking the option): I always have this disabled as most of the VPs VW thinks are out of date aren't out of date at all + it would be a disaster if it decided to update dozens of 3D renders unnecessarily.

 

5 hours ago, hollister design Studio said:

What about doubling the doors on two different classes

 

You could do but in most cases I expect this would be even more work: you'd have to make sure the second doors weren't included in schedules or picked up by tags, make sure they got edited alongside the first door if you needed to make any changes, etc

  • Like 1
Link to comment

It's quite easy to achieve this if you build your own door objects. Make the door leaf a symbol, duplicate it and rotate one copy 90 degrees. Make two classes, one "doors open" and one "doors closed" and put the instances of the door leaf in each. Then you can choose per viewport which of those classes you want visible and hence whether the doors are open or closed. If you want you can make it more fine grained and control it per door.

 

This of course is not very helpful if you need/want to use VW door objects. However, it makes it feel like it shouldn't be all that difficult to implement for VW doors.

  • Like 1
Link to comment
3 minutes ago, line-weight said:

It's quite easy to achieve this if you build your own door objects. Make the door leaf a symbol, duplicate it and rotate one copy 90 degrees. Make two classes, one "doors open" and one "doors closed" and put the instances of the door leaf in each. Then you can choose per viewport which of those classes you want visible and hence whether the doors are open or closed. If you want you can make it more fine grained and control it per door.

 

This of course is not very helpful if you need/want to use VW door objects. However, it makes it feel like it shouldn't be all that difficult to implement for VW doors.


I actually did this recently but found that I couldn’t turn off the second leaf in my Graphic Legend for summer reason. In fact I have encountered this elsewhere with Hidden Line viewports: I have had symbols containing two different states for the same object, separated by class, but in HL both classes remain visible regardless of the class visibility settings. In Shaded the visibilities work as expected but not in HL. I have had to separate the two different states into two different symbols + control the visibility of the symbols in order to get the VP to display properly. Don’t think I’ve seen this reported elsewhere but it has definitely happened to me several times, including like I say a few days ago with a custom door symbol. I had to delete the open leaf geometry from the symbol in order for the GL to display correctly…

Link to comment
25 minutes ago, Tom W. said:


I actually did this recently but found that I couldn’t turn off the second leaf in my Graphic Legend for summer reason. In fact I have encountered this elsewhere with Hidden Line viewports: I have had symbols containing two different states for the same object, separated by class, but in HL both classes remain visible regardless of the class visibility settings. In Shaded the visibilities work as expected but not in HL. I have had to separate the two different states into two different symbols + control the visibility of the symbols in order to get the VP to display properly. Don’t think I’ve seen this reported elsewhere but it has definitely happened to me several times, including like I say a few days ago with a custom door symbol. I had to delete the open leaf geometry from the symbol in order for the GL to display correctly…

 

Hm. I don't think that's happened to me (yet).

 

I wonder if it's a symbol-inside-a-symbol problem?

 

In many cases, my custom doors/windows are actually groups rather than symbols (so the door leafs are symbols within a group).

Link to comment

You might find this helpful.  

 

I made a couple scripts when 3D Web views first came out to open all the doors in a drawing so the client wouldn't have to crash through closed doors.  One opens all the doors that have "On Schedule" checked.  The other one returns them to their original state.  It uses User Field 9 and 10 to store the original state of the door.

 

I'll attach a file with the scripts and a couple doors to swing open and closed.

 

Here is the script to open the doors in 3D:

PROCEDURE OpenTheDoor;

{14 April 2017}
{Badly scripted by Michael Klaers}

{This script preps the doors in a drawing to be ready to 'Export Web View'
It preserves the 3D Open boolean and the open angle of each door in User Field 9 and 10
and then sets the 3DOpen to TRUE and the Open Angle to 90°}

{There is a companion script that restores the doors to their original state}

VAR
	
	ShouldILeaveThisOpen	: STRING;
	OriginalOpenAngle  		: STRING;	
	
{------------------------------------------------------------Record & Open Procedure}	
	
PROCEDURE RecordAndOpen(h : HANDLE);
	BEGIN


		ShouldILeaveThisOpen := GetRField(h,'Door','3DOpen');
		OriginalOpenAngle := GetRField(h,'Door','OpenAngle');
		SetRField(h,'Door','UserFld9',OriginalOpenAngle);	
		SetRField(h,'Door','UserFld10',ShouldILeaveThisOpen);
		SetRField(h,'Door','OpenAngle','90');
		SetRField(h,'Door','3DOpen','TRUE');
		ResetObject(h);

	END;

{-----------------------------------------------------------------------Main Program}	

BEGIN

ForEachObject(RecordAndOpen,(((R IN ['Door']) & ('Door'.'OnSched'=TRUE))));

END;


RUN(OpenTheDoor);

Change the number in SetRField(h,'Door','OpenAngle','______'); to be whatever angle you want.

 

 

 

This is the script to restore the doors to closed:

PROCEDURE CloseTheDangDoor;

{14 April 2017}
{Badly scripted by Michael Klaers}

{This script restores the doors in a drawing after 'Export Web View'
It recalls the 3D Open boolean and the open angle of each door from User Field 9 and 10
and then restores the 3DOpen Boolean and the Open Angle to their original values}

{There is a companion script that records original state of the doors.  Run that one first.}

VAR
	OriginalOpenAngle  		: STRING;	
	ShouldILeaveThisOpen	: STRING;


{------------------------------------------------------------Read & Restore Procedure}	

PROCEDURE WereYouBornInABarn(h : HANDLE);

	BEGIN

		OriginalOpenAngle := GetRField(h,'Door','UserFld9');	
		ShouldILeaveThisOpen := GetRField(h,'Door','UserFld10');
		SetRField(h,'Door','OpenAngle',OriginalOpenAngle);
		SetRField(h,'Door','3DOpen',ShouldILeaveThisOpen);
		ResetObject(h);
	
	END;

{----------------------------------------------------------------------Main Program}	

BEGIN

ForEachObject(WereYouBornInABarn,(((R IN ['Door']) & ('Door'.'OnSched'=TRUE))));

END;


RUN(CloseTheDangDoor);

 

 

Much faster than doing it manually 🙂 

Open the Doors.vwx

  • Like 3
Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...