iFeature.FindRow causes "Cannot change that row" error

iFeature.FindRow causes "Cannot change that row" error

lweymouth5
Explorer Explorer
177 Views
1 Reply
Message 1 of 2

iFeature.FindRow causes "Cannot change that row" error

lweymouth5
Explorer
Explorer

Hi, I have this snippet of code which finds the next suitable row for an iFeature and it works about 20% of the time. However, more often than not, I get the error:
"System.ArgumentException: iFeature.FindRow("iFeatureName"): Cannot change the row." on row 3
(I've changed the name of the iFeature here to generic due to work IP)


Below is the snippet of code which is causing the headache.

	Logger.Warn("Starting base member check")
Try
	i = iFeature.FindRow("iFeatureName", "b1", "=", BASE_ANGLE_A, "b2", "=", BASE_ANGLE_A, "t", ">=", BASE_ANGLE_t - 0.5)
	Logger.Warn("Currently Selected row " & i)
Catch ex As Exception
	Logger.Error("Error is: " & ex.ToString)
	Exit Sub
End Try

Try
	iFeature.ChangeRow("iFeatureName", i)
Catch ex As Exception
	Logger.Warn("Struggling to change to the selected row")
	Logger.Error("Error is: " & ex.ToString)
End Try

the double try was just to identify where the error was occurring, which happened to be assigning when "i"

I'm really struggling here as I'm only trying to read the row using

i = iFeature.FindRow("iFeatureName",...........

and I'm getting a change row error. Am I accidentally modifying the iFeature with this one or accessing it incorrectly?

Again, it definitely has worked before but is inconsistent.

Any feedback is greatly appreciated

 

0 Likes
178 Views
1 Reply
Reply (1)
Message 2 of 2

bradeneuropeArthur
Mentor
Mentor
could you share that ifeature?

Regards,

Arthur Knoors

Autodesk Affiliations & Links:
blue LinkedIn LogoSquare Youtube Logo Isolated on White Background


Autodesk Software:Inventor Professional 2025 | Vault Professional 2024 | Autocad Mechanical 2024
Programming Skills:Vba | Vb.net (Add ins Vault / Inventor, Applications) | I-logic
Programming Examples:
Drawing List!|
Toggle Drawing Sheet!|
Workplane Resize!|
Drawing View Locker!|
Multi Sheet to Mono Sheet!|
Drawing Weld Symbols!|
Drawing View Label Align!|
Open From Balloon!|
Model State Lock!
Posts and Ideas:
My Ideas|
Dimension Component!|
Partlist Export!|
Derive I-properties!|
Vault Prompts Via API!|
Vault Handbook/Manual!|
Drawing Toggle Sheets!|
Vault Defer Update!

! For administrative reasons, please mark a "Solution as solved" when the issue is solved !


 


EESignature

0 Likes