Ruby: Find the first 7 characters


stevenyhof
 Share

Recommended Posts

I did it. Made a .plan and put it with my layout file to keep them together.

Sent to my default layout page and cropped it.

I've been looking around to find how to remove the 1st Floor note - seems to come along ???

cropped.jpg

Link to comment
Share on other sites

Zip file with layout and plan that does what you want. Downside is you text size is controlled by layout box text style. It's a small section of plan sent to layout page "0". Requires both macros in the layout (included) It reads from the filename from the plan file sent not from the layout (used Michael's suggestion about referenced_filename-thanks) Found the truncate code on Stack Overflow. (elipse may be unnecessary? ...)

image.thumb.png.89d489eee6e5de82e6eda9115b402174.png

Personally I'd be looking at using the shorter filename and finding a way to add the other information in the OS. File names that long get to be annoying when a lot of tabs are open. I did this one quickly in Directory Opus. Have not checked to see if there is a way to automate the comment there but I would think it possible. Maybe in windows too but that I'm not looking into since I already use Dopus to set up folder per job.

image.thumb.png.076e9a380ec96a2f7514531744a3bece.png

Truncate.zip

Link to comment
Share on other sites

12 minutes ago, MarkMc said:

Zip file with layout and plan that does what you want. Downside is you text size is controlled by layout box text style. It's a small section of plan sent to layout page "0". Requires both macros in the layout (included) It reads from the filename from the plan file sent not from the layout (used Michael's suggestion about referenced_filename-thanks) Found the truncate code on Stack Overflow. (elipse may be unnecessary? ...)

 

You should only need a single macro and it can be a lot simpler.  It could live in the label or in a text box with an arrow (I would personally do the latter so I have more freedom with text formatting the isn't tied to other labels).  In fact, in X12, you don't need a custom macro at all.  You could enter the code right in the text box or label.  I would probably use something more like...

 

%referenced_filename[0..6]% 

 

Link to comment
Share on other sites

3 minutes ago, Alaskan_Son said:

 

You should only need a single macro and it can be a lot simpler.  It could live in the label or in a text box with an arrow (I would personally do the latter so I have more freedom with text formatting the isn't tied to other labels).  In fact, in X12, you don't need a custom macro at all.  You could enter the code right in the text box or label.  I would probably use something more like...

 

%referenced_filename[0..6]% 

 

Tried all that without success, likely pilot error but once I get something to work I stop running down the rabbit hole.

Link to comment
Share on other sites

I got %referenced_filename[0..6]%   to work so long as it referenced a layout box from the plan. Can't get it to work otherwise, can't find anything in the layout that has any file properties. But a text box with arrow is an improvement as is [0...6] thanks

Link to comment
Share on other sites

23 minutes ago, MarkMc said:

I got %referenced_filename[0..6]%   to work so long as it referenced a layout box from the plan. Can't get it to work otherwise

 

12 minutes ago, Chopsaw said:
2 hours ago, Alaskan_Son said:

If you want to use the plan file name, simply place the macro in your plan file, a CAD Detail is as good a place as any, send that view to layout

 

I think this tip still applies Mark.

 

Link to comment
Share on other sites

Just now, Chopsaw said:

 

 

As I said- I can't find ANY properties in the layout that to the layout file name that can be accessed. From what I can see no matter how you slice it your are sending something from plan to get the information. Happy to be shown otherwise, I just can't find it.

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