i have found the macro to acces the properties from excel to inventor , but issue is i have number of files in other excel it need to write in inventor ..........
current macro as only able to write active document,please alter the macro for acces the document
this macro help to write to solid works part to be write i need to write in invemtor
Private Sub CommandButton2_Click ()
'how many attributes are read
Attrkpl = Sheet1.Range ("D3"). Value
Attrkplm = "-" & Attrkpl
'' gripped 'to the SW
Set SwApp = CreateObject ("SldWorks.Application")
'Activate the sheeting for security
Worksheets ( "Assys"). Activate
'read a work folder
Path = Sheet1.Range ("D4") Value & "\"
'to the start point
Sheet1.Range ( "A8"). Activate
'until the filename is empty, ie the templates are over ...
Do While ActiveCell.Value <> ""
'open the file
File = ActiveCell.Value
Set Model = swApp.OpenDoc (Path & File, swDocAssembly)
ActiveCell.Offset (0, 2) .Activate
'delete custom information and type new
Set AttrNimiSolu = Sheet1.Range ("C6")
For i = 1 To Attrkpl
retval = Model.DeleteCustomInfo2 ("", AttrNimiSolu)
retval = Model.AddCustomInfo3 ("", AttrNimiSolu, swCustomInfoText, ActiveCell.Value)
ActiveCell.Offset (0, 1) .Activate
Set AttrNimiSolu = AttrNimiSolu.Offset (0, 1)
Next i
'Configuration information the same thing, first transfer
ActiveCell.Offset (1, Attrkplm - 1) .Activate
Config = Model.GetConfigurationNames
For j = 0 To UBound (Config)
Set AttrNimiSolu = Sheet1.Range ("C6")
Configuration = ActiveCell.Value
For k = 1 To Attrkpl
ActiveCell.Offset (0, 1) .Activate
If ActiveCell.Value <> "" Then
retval = Model.DeleteCustomInfo2 (Configuration, AttrNimiSolu)
retval = Model.AddCustomInfo3 (Configuration, AttrNimiSolu, swCustomInfoText, ActiveCell.Value)
else
retval = Model.DeleteCustomInfo2 (Configuration, AttrNimiSolu)
End If
Set AttrNimiSolu = AttrNimiSolu.Offset (0, 1)
Next k
ActiveCell.Offset (1, Attrkplm) .Activate
Next j
'go next to the title
ActiveCell.Offset (1, -1) .Activate
'save and close the already processed template
Model.Save
Title = Model.GetTitle
swApp.CloseDoc Title
loop
MsgBox "Done!"
End Sub