Community
Inventor Programming - iLogic, Macros, AddIns & Apprentice
Inventor iLogic, Macros, AddIns & Apprentice Forum. Share your knowledge, ask questions, and explore popular Inventor topics related to programming, creating add-ins, macros, working with the API or creating iLogic tools.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Parameter Access

2 REPLIES 2
Reply
Message 1 of 3
amitnkukanur
305 Views, 2 Replies

Parameter Access

How to access inventor assembly/Part parameters such as do,d1,d2,d3...... etc without going inside inventor.

I used apprentice server but i can display part names but parameters are not accessible.

 

Any Idead on how to do it

 

Senior Software Engineer
2 REPLIES 2
Message 2 of 3
jdkriek
in reply to: amitnkukanur

That data is only available through Inventor.

 

Even if it were possible to extract the data without Inventor you would still need it to modify the data and recompute the part.

Jonathan D. Kriek
MFG Solutions Engineer
KETIV Technologies, Inc.


Message 3 of 3
amitnkukanur
in reply to: amitnkukanur

Ok, then i will create a inventor instance and access, it this is the below code

 

 

 

Try

Try
oApp = System.Runtime.InteropServices.Marshal.GetActiveObject("Inventor.Application")
Catch ex As Exception

End Try

If oApp Is Nothing Then
Dim InventorAppType As Type = System.Type.GetTypeFromProgID("Inventor.Application")
oApp = System.Activator.CreateInstance(InventorAppType)

oApp.Visible = False
bCloseInventorApp = True
End If

 

Dim SelectedItem As Object
Dim ThisApplication As Inventor.Application
ThisApplication = oApp.ActiveDocument

SelectedItem = oApp.Documents.ItemByName("D:\Rocker\test.ipt")
For Each OtherAParam As Parameter In SelectedItem.ComponentDefinition.Parameters
If (OtherAParam.Name = "d5") Then

Dim WeldMent As Double = 14.5 - 12

Dim ExistingVal As String = OtherAParam.Expression
ExistingVal = ExistingVal.Substring(0, ExistingVal.Length - 3)
Dim ExistingValToDouble As Double = Convert.ToDouble(ExistingVal)
WeldMent = WeldMent + ExistingValToDouble

Dim NewVal As String = Convert.ToString(WeldMent)
NewVal = NewVal + vbTab + "mm"
OtherAParam.Expression = NewVal

End If
Next

 

 

I am trying to do some calculations is it rite

Senior Software Engineer

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report