Auto fill-in of prompted entry text

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
I am wanting to know if it is possible to use iLogic to copy a value from iProperties into a Field text.
As I am not a programmer I can not easily come up with the syntax.
The field text is located in the title block and is for the sheet scale pulled from the base view of the sheet.
I am wanting to do this so the sheet scale is no longer hand entered. There is too much room for error (sausage fingers) for this method to continue.
What I am trying to figure out is: field text."dwg scale" = custom iproperties. "Scale #"
Below is the code that I have. The line of code (in red) is just wrong.
Any ideas? maybe the code to accomplish this?
Any other ideas how to automate this to remove the possibility of human error?
Any assistance would be greatly appreciated.
' Sheet scale from base view
Dim odrawdoc As DrawingDocument
odrawdoc = ThisApplication.ActiveDocument
customPropertySet = odrawdoc.PropertySets.Item("Inventor User Defined Properties")
'i is a counter so that each cycle through this it increments i
For i = 1 To odrawdoc.Sheets.Count
'Make sure the desired property exists
Try
prop = customPropertySet.Item("Scale" + Str(i))
Catch
'Assume error means not found and create custom iProperty
customPropertySet.Add("", "Scale" + Str(i))
End Try
'set value of custom iProperty = base view scale for the sheet
Try
iProperties.Value("Custom", "Scale" + Str(i)) = odrawdoc.sheets.item(i).DrawingViews.Item(1).ScaleString
Catch
End Try
Next i
InventorVb.DocumentUpdate()
Try
odrawdoc."Sheet:1".TitleBlock.Value("DWG SCALE") = iProperties.Value("Custom", "Scale 1")
Catch
End Try