GDL
About building parametric objects with GDL.

Object update with Story

MichaelIserief
Contributor

I am currently trying to create a downpipe object that can update directly with the story height. During my adventures it seemed to be working and now I have lost it. Is there a way to get the object to update when someone adjusts the story heights?

 

At the moment it works, but you have to manually update the object by opening and closing the settings dialogue. I'm almost certain I am missing something simple, any help is greatly appreciated

6 REPLIES 6
Barry Kelly
Moderator

Are you inquiring the story height in the master script and setting the object parameter height?

That should work I think.

If you do it in any other script, you have to open the object settings to make the scripts run.

 

Barry.

One of the forum moderators.
Versions 6.5 to 27
Dell XPS- i7-6700 @ 3.4Ghz, 16GB ram, GeForce GTX 960 (2GB), Windows 10
Lenovo Thinkpad - i7-1270P 2.20 GHz, 32GB RAM, Nvidia T550, Windows 11
MichaelIserief
Contributor

I think I am, I have the below in the Master Script. All the variables that are used in the 3D script are either sourced from the Parameters list or are defined as local variables in the master script

 

 

 

n = REQUEST ("Story_info", "", nStories, index1, name1, elev1, height1)

Dim StoryNames []
dim StoryIndex []
dim StoryElev []

for name = 1 to nStories
	n = REQUEST ("Story_info", Name+index1-1, nStories, StoryIndex[Name], StoryNames[Name], StoryElev[Name], height)
next name

values{2} "i_TopStory", StoryIndex, StoryNames

n = REQUEST ("Home_story", "", Homestory, Homestory_name)
n = REQUEST ("Story_info", Homestory, HS, HSIndex, HSname, HSelev, HSheight)
n = REQUEST ("Story_info", i_TopStory, TS, TSindex1, TSname, TSelev, TSheight)

if b_AutoHeight then 
	_DPHeight = TSelev - HSelev + z_Dropoff
	parameters  ac_bottomlevel = HSelev,
				ac_toplevel = _DPHeight,
				zzyzx = _DPHeight
endif

 

 

p.s. please be kind, it might be a touch messy 🙂

If the down pipe height is just to be set for the home storey, then shouldn't ... _DPHeight = HSHeight plus/minus extra bits like z_Dropoff if you need to adjust the height.

HSelev I think is just the storey height above Project Zero, not the storey height.

 

If it is to span multiple storeys, then you need to sum the heights for all of those storeys it is a part of.

The storey elevation (Selev) will be irrelevant if it starts on story 3 and goes up to storey 5, as the top storey elevation will be the height above Project Zero, and not from the storey the downpipe starts in.

 

If it always starts from the ground (Project Zero) then TSelev + TSHeight might be what you need.

 

Barry.

One of the forum moderators.
Versions 6.5 to 27
Dell XPS- i7-6700 @ 3.4Ghz, 16GB ram, GeForce GTX 960 (2GB), Windows 10
Lenovo Thinkpad - i7-1270P 2.20 GHz, 32GB RAM, Nvidia T550, Windows 11

I was (and still am) struggling to resolve the sum of the story heights as the project has stories below project 0. That's why I opted for the elevation sum as it was easier to take the top elevation and subtract the bottom elevation rather than add through story 0, I'm sure I am missing something simple.

 

If you think using the story heights rather than the story elevations will get it to update with the stories as they adjust I'll keep wrestling with it 🙂

The elevator object has a super awesome example of story handling. It's how I learned and I have tons of objects that are linked by default. It's pretty easy once you have everything calculated.

MichaelIserief
Contributor

Thanks for the advise everyone. 

 

@Barry Kelly I have attempted to get the sum of heights method to work, however I am struggling with it. I don't seem to be able to find the right configuration to be able to sum and store the height of the object. For the moment I have stayed with the top elevation - bottom elevation style as i find this easier to manage but I am always interested in learning new methods.

 

@SenecaDesignLLC I took your advise and checked out the elevator object. It gave me a better understanding of how the story requests and arrays are handled, however I couldn't make out how it kept the live updating.

 

The answer (I think anyway) lies with a thread which I cant seem to relocate. effectively the height needs to be set as a local variable so the script is able to edit it as it runs? I was using the parameter function to display the height in the settings box, but had missed the local variable part. If anyone can articulate it better than I can please feel free as I am not sure I fully understand it, but it works so that's something 😄

 

if b_AutoHeight then 
	_DPHeight = TSelev - HSelev + z_Dropoff
!ADDED LINE
	 zzyzx = _DPHeight
!ADDED LINE
	parameters  ac_bottomlevel = HSelev,
				ac_toplevel = _DPHeight,
				zzyzx = _DPHeight

 

Didn't find the answer?

Check other topics in this Forum

Back to Forum

Read the latest accepted solutions!

Accepted Solutions

Start a new conversation!