Ruby Question: Passing a value from one plan file to another


Doug_N
 Share

Recommended Posts

HI Ruby Geeks  :rolleyes:  

 

I am using two plan files for a layout, one of the house and one for a detached two story garage.  In doing the site statistics I create ruby global variables for floor areas, exterior wall areas, ridge and eave heights for inclusion of a lot statistics analysis.   

 

I do the tables in a cad detail file in the house plan file, but I can't find a way to pass the values of the variables in the garage plan file to the cad detail sheet in the house plan file. 

 

Any ideas on how to do this, or a work around?

 

Doug 

Link to comment
Share on other sites

28 minutes ago, Doug_N said:

HI Ruby Geeks  :rolleyes:  

 

I am using two plan files for a layout, one of the house and one for a detached two story garage.  In doing the site statistics I create ruby global variables for floor areas, exterior wall areas, ridge and eave heights for inclusion of a lot statistics analysis.   

 

I do the tables in a cad detail file in the house plan file, but I can't find a way to pass the values of the variables in the garage plan file to the cad detail sheet in the house plan file. 

  

Any ideas on how to do this, or a work around?

 

Doug 

 

Globals are stored with the instance of Chief, not necessarily with the plan or layout file so it should already work like you want.  That being said, the variables need to be defined before you can use or display them elsewhere.  To help ensure this is happening, it can be useful to place a layout box containing the items generating the variables in the first place off to the side on your layout page where the variables are being used or displayed. 

Link to comment
Share on other sites

1 hour ago, Alaskan_Son said:

 

Globals are stored with the instance of Chief, not necessarily with the plan or layout file so it should already work like you want.  That being said, the variables need to be defined before you can use or display them elsewhere.  To help ensure this is happening, it can be useful to place a layout box containing the items generating the variables in the first place off to the side on your layout page where the variables are being used or displayed. 

By Layout Page your are referring to the layout file?   Does that mean I should define the variables in the layout first, then use them in the plan file?

 

filename.layout >   page xxx    %$lotarea=999%

 

filename.plan >  First Floor (plan view)  [polyline shape] (label) %$lotarea= area.round(2)%  

 

Something like that?

 

Link to comment
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
 Share