Community
I'm trying to get a parameter value from an Inventor .dwg file, but I keep getting an error saying the file is not found. I use this same code all over the place between different parts but its the first time I'm tried it using a dwg. Can you not access an Inventor .dwg parameters using iLogic or am I having a Monday morning brain cramp?
MsgBox(Parameter(ThisDoc.Path & "\MyDrawing.dwg", "Customer"))
Try this rule from any part document located in the same directory as your DWG.
(I used model file "cube.ipt")
'create file name Dim DwgFileName As String = ThisDoc.Path & "\cube.dwg" 'open DWG file invisibly Dim oDoc as DrawingDocument = ThisApplication.documents.Open(DwgFileName, False) 'read user parameter "AAA" value Dim x As Double = odoc.parameters.item("AAA").Value 'close dwg file without saving any changes oDoc.Close(True) 'display parameter value MsgBox(x)