Ruby Macro for Layout Page Information


cartersjohnson
 Share

Recommended Posts

I would like to create a custom sheet index for my plan sets (the default schedules are garbage in my opinion) that is able to grab layout page information, such as the label and title. The sheet index would be located on page 1 of my drawings, but be able to pull information from other pages. I'm thinking of having something that looks similar to this:

 

Sheet Index

A0.1     General Notes

A1.0     Floor Plan

A2.0     Sections

And so on...

 

The first column is the sheet labels while the second column is the sheet titles. I understand that the Macros typically use a context like "owner object" or "referenced object", but that obviously won't work in this case since the text is neither a label nor able to touch the desired "object". However, I imagine this should be possible as CA has code for their default page schedule.

 

Are there any Chief Macro gurus out there that know of a function that can return layout page information for any specified sheet? Perhaps would look something like this, 'pagelayout.label()'? Which will take the argument for the sheet number you are wanting the result from?

 

 

Link to comment
Share on other sites

9 minutes ago, cartersjohnson said:

I would like to create a custom sheet index for my plan sets (the default schedules are garbage in my opinion) that is able to grab layout page information, such as the label and title. The sheet index would be located on page 1 of my drawings, but be able to pull information from other pages. I'm thinking of having something that looks similar to this:

 

Sheet Index

A0.1     General Notes

A1.0     Floor Plan

A2.0     Sections

And so on...

 

The first column is the sheet labels while the second column is the sheet titles. I understand that the Macros typically use a context like "owner object" or "referenced object", but that obviously won't work in this case since the text is neither a label nor able to touch the desired "object". However, I imagine this should be possible as CA has code for their default page schedule.

 

Are there any Chief Macro gurus out there that know of a function that can return layout page information for any specified sheet? Perhaps would look something like this, 'pagelayout.label()'? Which will take the argument for the sheet number you are wanting the result from?

 

 

Just curious what other info you are trying to display in your Layout Page Table, as it already has the capability to show everything you just listed?
image.thumb.png.bed7b4dc9d2059ceb078ff6e21086163.png

Link to comment
Share on other sites

2 minutes ago, Renerabbitt said:

Just curious what other info you are trying to display in your Layout Page Table, as it already has the capability to show everything you just listed?

That's all the information I'm trying to display, but I can't figure out how to display the information for pages 1-XX on sheet 1. The default global macro for the layout info in question will only return that info for the specific page which has the text.

 

Just as an example... I can't have text on sheet 1 which references the page title from sheet 5. 

Link to comment
Share on other sites

5 minutes ago, cartersjohnson said:

That's all the information I'm trying to display, but I can't figure out how to display the information for pages 1-XX on sheet 1. The default global macro for the layout info in question will only return that info for the specific page which has the text.

 

Just as an example... I can't have text on sheet 1 which references the page title from sheet 5. 

Are you using Tools\Layout\Layout Page Table?
Are you entering info on each layout page using Tools\Layout\Edit Page Information\?

 

Link to comment
Share on other sites

4 minutes ago, Renerabbitt said:

Are you using Tools\Layout\Layout Page Table?
Are you entering info on each layout page using Tools\Layout\Edit Page Information\?

 

I know about the Layout Page Table and can use it to provide a sheet index just fine. The problem is I don't like the format of the Layout Page Table, so I would like to create my own using Rich Text box and custom macros. Check out this image which has my new Rich Text Sheet index I'm working on and the default Layout Page Table. I could spend the time each project to fill out the Rich Text box to match the Layout Page Table, but I'd like to automate it so it populates the fields from the Edit Page Information dialog box.

Sheet Index.png

Link to comment
Share on other sites

26 minutes ago, cartersjohnson said:

I know about the Layout Page Table and can use it to provide a sheet index just fine. The problem is I don't like the format of the Layout Page Table, so I would like to create my own using Rich Text box and custom macros. Check out this image which has my new Rich Text Sheet index I'm working on and the default Layout Page Table. I could spend the time each project to fill out the Rich Text box to match the Layout Page Table, but I'd like to automate it so it populates the fields from the Edit Page Information dialog box.

 

You could accomplish it, but would be very cumbersome to setup and not user friendly for any future collaborative work. 
You would simply be making global macros for each page that you could callup in your DIY page table. You would lose the automation of the page label (though you could create smething similar with a complex macro) and would be an awful lot of work for adding or deleting pages. If this was a one-off plan set that you wanted to have a uniform graphical quality to I would understand. I don't see a lot of difference between what you show there however. Easy enough to turn of the Layout page Table heading and make your own, adjust your column widths. Yes you don't have control over kerning or row height sure, but I would encourage all user not to use Rich Text in their plans and layouts anyways. 

Link to comment
Share on other sites

9 minutes ago, Renerabbitt said:

You could accomplish it, but would be very cumbersome to setup and not user friendly for any future collaborative work. 
You would simply be making global macros for each page that you could callup in your DIY page table. You would lose the automation of the page label (though you could create smething similar with a complex macro) and would be an awful lot of work for adding or deleting pages. If this was a one-off plan set that you wanted to have a uniform graphical quality to I would understand. I don't see a lot of difference between what you show there however. Easy enough to turn of the Layout page Table heading and make your own, adjust your column widths. Yes you don't have control over kerning or row height sure, but I would encourage all user not to use Rich Text in their plans and layouts anyways. 

I actually just discovered that I can take the table and convert it to Rich Text and format, which could be done at the end of the project with little work. However, I'm interested to know why you don't like Rich Text in plans and layouts?

Link to comment
Share on other sites

1 hour ago, cartersjohnson said:

I actually just discovered that I can take the table and convert it to Rich Text and format, which could be done at the end of the project with little work. However, I'm interested to know why you don't like Rich Text in plans and layouts?

Because RT is not dynamic… I can go back to any of my plans from the last 5 years that utilize Text and uniformly change all text to print a page at a different scale. Also, all of my details can immediately have text adjusted for scale uniformly without changing the size of the view sent to layout.  The same way it is nice to adjust text in notes, callouts, labels etc just by changing your text defaults. Makes collaborating a breeze and adjusting to new features as they rollout when you’ve got a stocked library full of text based items. Part of increasing margins is to increase efficiency… when you start automating redundant tasks, you can see a 60 hour plan get cut down to 25

Link to comment
Share on other sites

1 hour ago, cartersjohnson said:

discovered that I can take the table and convert it to

BTW you can create a custom note schedule in plan and let your plan drive your labeling convention and then utilize macros. Just need to send the plan view to layout… I have a video that caught a lot of heat where I build a condoc from plan only, it’s on the forums somewhere, I’ll try and find it tomorrow.

Link to comment
Share on other sites

3 hours ago, Renerabbitt said:

BTW you can create a custom note schedule in plan and let your plan drive your labeling convention and then utilize macros. Just need to send the plan view to layout… I have a video that caught a lot of heat where I build a condoc from plan only, it’s on the forums somewhere, I’ll try and find it tomorrow.

That would be cool. Thank you for all the help!

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