04-08-2022
08:04 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
04-08-2022
08:04 AM
I Found a better method, hint: pay attention to errors and use them.
'can use in drawing or model or part, doesnt matter
Try
If (ThisDrawing.ModelDocument Is Nothing) Then Return
modelName = IO.Path.GetFileName(ThisDrawing.ModelDocument.FullFileName)
Catch
modelName = IO.Path.GetFileName(modelName)
End Try
Try
If iProperties.Value(modelName, "Custom", "Ref. Number") = Nothing Then
'if not exist causes error
End If
Catch
'create it
iProperties.Value(modelName, "Custom", "Ref. Number") = ""
End Try