can any one help ....how to extarct custom properties to excel Greg Jankowski@
can any one help ....how to extarct custom properties to excel Greg Jankowski@
with refrence to your excel macro , i have found macro for to write in inventor file , but issue is it can write only active part in software .... so ineed to write simliar to solid works in inventor in batch can please help ... i have attached excel file of inventor or macro inside
Option Explicit
Public Sub CopyProperties(invPropertySets As PropertySets, exSheet As Excel.Worksheet)
' Iterate through the properties defined on the specified sheet.
Dim bFinished As Boolean
bFinished = False
Dim iRow As Integer
iRow = 2
Do
Dim strPropertySetName As String
Dim strPropertyName As String
Dim vtPropertyValue As Variant
If exSheet.Cells(iRow, 1) <> "" Then
strPropertySetName = exSheet.Cells(iRow, 1)
strPropertyName = exSheet.Cells(iRow, 2)
vtPropertyValue = exSheet.Cells(iRow, 3)
' Get the specified property set.
On Error Resume Next
Dim invPropSet As Inventor.PropertySet
Set invPropSet = invPropertySets.Item(strPropertySetName)
If Err Then
Err.Clear
MsgBox "The specified property set """ & strPropertySetName & """ does not exist. Aborting.", vbExclamation + vbOKOnly, "Property Set Does Not Exist"
Exit Sub
End If
' Get the specified property.
Dim invProp As Inventor.Property
Set invProp = invPropSet.Item(strPropertyName)
If Err Then
Err.Clear
' Check to see if the property set is a custom set.
If UCase(strPropertySetName) = UCase("Inventor User Defined Properties") Then
' Create the property.
Call invPropSet.Add(vtPropertyValue, strPropertyName)
Else
MsgBox "The specified property """ & strPropertyName & """ does not exist. Aborting.", vbExclamation + vbOKOnly, "Property Does Not Exist"
End If
Else
' Set the value of the property.
invProp.Value = vtPropertyValue
If Err Then
MsgBox "Failed to set the value for """ & strPropertySetName & "." & strPropertyName, vbInformation + vbOKOnly, "Failure Setting Property Value"
End If
End If
Else
bFinished = True
End If
iRow = iRow + 1
Loop While Not bFinished
End Sub
dear all my customer need the requriemnt of conversion of sw part to auto desk inventor .... so i alredy informed them that can convert via CAD formates but un editable in ither software .............there requriment is sw proerties as to move to new inventor file property ..... with sw to excel and excel to inventor proerty ..... any waty i ll try this above methods if any help me ok
SWie:
https://sloworks.fi/www/muut/