Just upgraded to R8, playing with Block Attributes. If I make a block for a detail title, and have the Detail Number, Detail Name, and Detail Scale as attributes, is there a way to have the attributes automatically populate?
Workflow I was thinking:
Run a custom alias or script, it prompts to select a detail
Finds the lowest left point of the detail, uses that for block base point
Pulls the Object Name and scale from the detail view, populates the attributes
Cheers; that’s what I’m trying to use though, in a more automatic way. Maybe I’m using it backwards or trying to jump too far ahead in my eagerness…in the section where your detail title (“FURNITURE LAYOUT - OPTION 1”) pulls the scale from the detail and changes from 1/8"=1’-0" to 1/4"=1’-0" - is that title/scale text in a block?
If it’s a block, when I enter the attributes, can I drop in an ObjectName or DetailScale text field?
If so, is there a way to script that, so I can click a button/enter a command, then select the detail view, and have the detail title automatically placed and have the attributes populated?
Details scale is text field is associate with a GUID (globally unique identifier) of a specific details.
It will likely not be possible to ever have the GUID when you inserting a title block.
Since layouts can have, details with different scale, associating the test with a specific detail is usually what is done.
One option is to add the Scale of the layout as a Layout User Text.
Then when you insert the title block and there is a text field that uses the Layout User Text line “layout scale”, then it will display in the title block.
Right click and copy key and value.
Right click and paste key and value to all Layouts…
Customize the value one layouts that are not primarily 1/4"=1’-0", or use a note like “Varies”.
Make text and pick Fx. Select Layout user text and the LayoutScale key.
Make a block and insert it on to the layouts.
The text field linked to the Layout User Text field updates automatically with each layout.
See how it is used here.
Just some input for your quest.
Sincerely,
Mary Ann Fugier
OK, so disclaimer - I don’t know much Python, only enough to get myself into trouble, BUT…combine sheer stubbornness with Google-Fu, and I think I have a good start here.
It seems that you’re right, so I thought…how about after I insert the block?
Used Python/Rhinoscript to:
pick a detail view
Find the bottom left point of that detail view for title insertion
place the block with temporary placeholders for the attribute text
Select the block that was just placed
Use SetUserText to set the Title to %<ObjectName(guid text) and the scale to the DetailScale
Now if only I could get the line between the title and the scale to automatically be as long as the longest text attribute…next quest!