Open with options ; How many options can be set, and how do I get Inventor to tell me that.

Open with options ; How many options can be set, and how do I get Inventor to tell me that.

tomprichard
Participant Participant
530 Views
1 Reply
Message 1 of 2

Open with options ; How many options can be set, and how do I get Inventor to tell me that.

tomprichard
Participant
Participant

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

0 Likes
Accepted solutions (1)
531 Views
1 Reply
Reply (1)
Message 2 of 2

tomprichard
Participant
Participant
Accepted solution

Ok. I see the remarks section is way down at the bottom of the help page

0 Likes