- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
After about 3 to 4 years of not programming, I'm getting back into it and using the Inventor API, so yes a newbie.. 😁
Ran into an issue and trying to figure out why I'm getting a Compile Error. This program is nothing big and just want a message box to show the radius of all the fillet features in my part file.
Private Sub Codeme()
Dim oPartDoc As PartDocument
Set oPartDoc = ThisApplication.ActiveDocument
Dim oFilletFeatures As FilletFeatures
Set oFilletFeatures = oPartDoc.ComponentDefinition.Features.FilletFeatures
Dim Counter As Integer
For Counter = 1 To oFilletFeatures.Count
Dim oFillet As FilletFeature
Set oFillet = oFilletFeatures.Item(Counter)
Dim oFS As ModelParameter
Set oFS = oFillet.FeatureDimensions.Item(1)
Dim oFS1 As Double
Set oFS1 = oFS.Parameter.ModelValue
MsgBox (oFS.Parameter.ModelValue)
Next
Why in the world is the line of Set oFS1 = giving me this error? When ModelValue type is "double". But I can take the oFS.Parameter.ModelValue statement and use it directly with the MsgBox line and I see the fillet information I need...
Working in 2020 if that makes a difference...
Update: Yes there's probably others ways this entire program can be coded.. I'm not looking for a redo of the entire program. Just an answer in why this given line is throwing a fit. Thanks...
Mark Lancaster
& Autodesk Services MarketPlace Provider
Autodesk Inventor Certified Professional & not an Autodesk Employee
Likes is much appreciated if the information I have shared is helpful to you and/or others
Did this resolve your issue? Please accept it "As a Solution" so others may benefit from it.
Solved! Go to Solution.