Announcements
Attention for Customers without Multi-Factor Authentication or Single Sign-On - OTP Verification rolls out April 2025. Read all about it here.

Create a custom property in a drawing for Author Initials

darren.lees
Contributor

Create a custom property in a drawing for Author Initials

darren.lees
Contributor
Contributor

Hello again,

It's been a little while since i've posted.   I hope you're all well  :beaming_face_with_smiling_eyes:

 

Unless it's me, I've noticed the AUTHOR of a drawing cannot be added to a drawing border during template creation.

Rather than add the initials of the part/assemblies designer to the template, I wish to add the initials of the creator of the actual drawing from the start.

 

So, create a drawing and have it instantly populate the DRAWN BY box with the initials of the person who has just created the drawing from scratch.

 

This MUST be possible through code or not.

 

I'm posting here as I'd thought of creating a custom property which strips out the required initials and uses the custom property in the border, which I know is possible.

 

Any help is greatly appreciated.

 

 

Regards

 

Darren

0 Likes
Reply
Accepted solutions (1)
355 Views
3 Replies
Replies (3)

WCrihfield
Mentor
Mentor
Accepted solution

Hi @darren.lees.  This is one of those things where how to accomplish this all depends on how you have (or choose to) set things up within your TitleBlockDefinition.  There are usually 3 possible routes for including 'Author' in the TitleBlock...(1) TextBox in which a 'Link' is included to the 'Author' iProperty of 'the model', (2) TextBox in which a 'Link' is included to the 'Author' iProperty of 'the drawing', (3) TextBox in which a 'PromptedEntry' is included.  If it is a PromptedEntry, then every time you add a new TitleBlock to a sheet based on that TitleBlockDefinition, it will instantly prompt you to manually fill in those PromptedEntries.  It sounds like you want Option 2 mentioned above, but I do not know if that is how you currently have your TitleBlockDefinition sketch set-up.  Once that is set-up that way, you would just need an automated way to fill in the value of the drawing's 'Author' iProperty.  I that property can either be automatically copied from 'the model' to the drawing, by some built-in document settings.  But it sounds like that is not what you want.  There are two obvious options left...(1) use an external iLogic rule, triggered by the 'New Document' event, that will prompt the user to fill in an InputBox, that will then be used to fill in the iProperty, (2) use an external iLogic rule, triggered by 'New Document' event, that pulls the information from the Application Options, General Tab, User Name setting, and uses that to fill in the iProperty automatically for you, based on whichever user creates the new drawing.

 

Edit:  And below is a fairly basic iLogic rule that could be used to automatically set the 'Author' iProperty of the drawing to the UserName of the current user, pulled from the application options, general tab.

Dim oDDoc As DrawingDocument = TryCast(ThisDoc.Document, Inventor.DrawingDocument)
If oDDoc Is Nothing Then Logger.Debug(iLogicVb.RuleName & " exited (wrong DocumentType)") : Return
oDDoc.PropertySets.Item(1).Item(3).Value = ThisApplication.GeneralOptions.UserName
oDDoc.Update2(True)

If this solved your problem, or answered your question, please click ACCEPT SOLUTION .
Or, if this helped you, please click (LIKE or KUDOS) :thumbs_up:.

Wesley Crihfield

EESignature

(Not an Autodesk Employee)

darren.lees
Contributor
Contributor

"use an external iLogic rule, triggered by 'New Document' event, that pulls the information from the Application Options, General Tab, User Name setting, and uses that to fill in the iProperty automatically for you, based on whichever user creates the new drawing."  This is the exact option I require,

I was thinking of taking the AUTHOR from the newly created drawing iProperties.  However, you make a very valid point in it is the User Name settingf from the Application Options dialogue box.  

Let me look into this a little further and I'll post back if I get a little bogged down  :beaming_face_with_smiling_eyes:

 

Thanks in advance!!

0 Likes

darren.lees
Contributor
Contributor

I've found a way to get the USER NAME from the General options.


I'll now use that in the drawing template to populate the DRAWN BY box.

 

Thank you for your help!!   I guess I just needed a little steering in the right direction.

0 Likes