Can VBA read text from a titleblock

Can VBA read text from a titleblock

Anonymous
Not applicable
311 Views
3 Replies
Message 1 of 4

Can VBA read text from a titleblock

Anonymous
Not applicable
Is it possible to have VBA read a plain text (not a property) string (in this case "TBVersion - 2") and put that into a custom property, bearing in mind that "TBVersion - 2" will increment ("TBVersion - 2.1", "TBVersion - 2.2", "TBVersion - 3" etc). If so, How?
Cheers
MattH
0 Likes
312 Views
3 Replies
Replies (3)
Message 2 of 4

Anonymous
Not applicable
OK, lets make things a tad clearer, I want a version number somewhere in my titleblock (not in the template) which can then be read and written as a custom property by VBA once the titleblock is inserted into an IDW. In this way, I can tell if an IDW contains the latest titleblock or not.
Regards
MattH
0 Likes
Message 3 of 4

Anonymous
Not applicable
Hello, Forgive me for questioning your workflow, however, if you were to create a custom property, do you then need to have this displayed on the drawing if the only way you utilize this is for question via a VBA routine? Either way, stash user defined properties here, Document.PropertySets.Item("User Defined Properties")Add(Value, PropertyName, PropertyID), that statement will add a custom property, doesn't allow you to specify the variable type though. HTH Scott
0 Likes
Message 4 of 4

Anonymous
Not applicable
Thanks for the response, unfortunately this method has no link between the titleblock (and its version) and the custom property. (Funny enough its exactly how I currently do it!) If the titleblock is changed, the custom property has to be manually changed, I'm looking for a way to automate the process, thus allowing for accurate TB version number recording.
Cheers
MattH
0 Likes