
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
How can I access the Username that is in Inventor's Application Options \ General Tab?
I have written some code to add initials and today's date to the Checked By, Checked Date fields. I currently have it entering a static value but would like to roll it out to other users.
This is what I currently have:
Public Sub SetCheckedByiProperty()
' Get the active document.
Dim oDoc As Document
Set oDoc = ThisApplication.ActiveDocument
' Get the PropertySets object.
Dim oPropSets As PropertySets
Set oPropSets = oDoc.PropertySets
' Get the design tracking property set.
Dim oPropSet As PropertySet
Set oPropSet = oPropSets.Item("Design Tracking Properties")
' Get the Checked By iProperty.
Dim oCheckedByiProp As Property
Set oCheckedByiProp = oPropSet.Item("Checked By")
' Set the Checked By iProperty.
oCheckedByiProp.Value = "RSM"
' Get the Date Checked iProperty.
Dim oDateCheckediProp As Property
Set oDateCheckediProp = oPropSet.Item("Date Checked")
' Set the Date Checked iProperty.
oDateCheckediProp.Value = Now
' Save the drawing.
oDoc.Save
End Sub
I need to pull the value entered in the Application Options User Name and use it in place of 'RSM' above.
Thanks,
Randy Mabery
Autodesk Inventor Professional 2009 SP2
Autodesk Productstream 2009
Intel i5 3.2GHz
7GB Ram
NVIDIA Quadro FX 1800
Solved! Go to Solution.