- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Some code, as shown below, attempts to guess at what the NameValueMap names are to load a model with options.
I'd like to know how to get Inventor to print me a list of all the possible names with debug, and tell me how I'm supposed to know the legal values, if they are pre-determined by Inventor, not the model's, author's, input?
(The programming help file seemed to say use VBA to get this info,,, ?)
Dim oOptions As NameValueMap
Set oOptions = ThisApplication.TransientObjects.CreateNameValueMap
Dim sName As String
'oOptions.Value("Full") = True
'oOptions.Value("Express") = False
'oOptions.Value("ExpressLoad") = True
'oOptions.Value("Load") = "Full"
'oOptions.Value("Positional Representation") = "Master"
'oOptions.Value("PositionRepresentation") = "Master"
'oOptions.Value("Position") = "Master"
'oOptions.Value("PositionalRepresentation") = 0
'oOptions.Value("LevelofDetailRepresentation") = 0
'oOptions.Value("LevelofDetail") = "Master"
'oOptions.Value("LOD") = "Master"
oOptions.Value("DesignViewRepresentation") = "LastActive" ' a shot in the dark,,, got one
oOptions.Value("SkipAllUnresolvedFiles") = False ' another shot in the dark,,, make that two
Debug.Print ("Options Count: " & oOptions.Count)
Set oDoc = ThisApplication.Documents.OpenWithOptions("MyDoc", oOptions, True)
Debug.Print ("Options Count: " & oOptions.Count)
For i = 1 To oOptions.Count
sName = oOptions.Name(i)
Debug.Print (sName)
Next i
Solved! Go to Solution.