How can I change this so that it's reading as a string?

How can I change this so that it's reading as a string?

chris
Advisor Advisor
237 Views
2 Replies
Message 1 of 3

How can I change this so that it's reading as a string?

chris
Advisor
Advisor

I have a small snippet of iLogic, however, I am getting an error on line 4 with the two parameters after the "=" about them not being a string... not sure how to fix it

 

If FcType = "FLAT FACE" Then
	Parameter("d0") = "Base_O"
	Parameter("d4") = "Base_T" - "Face_Off"
Else If FcType = "RAISED FACE" Then
	Parameter("d0") = "Base_R"
	Parameter("d4") = "Base_T"
End If
iLogicVb.UpdateWhenDone = True
InventorVb.DocumentUpdate()

chris_0-1712958476604.png

 

 

0 Likes
238 Views
2 Replies
Replies (2)
Message 2 of 3

Curtis_Waguespack
Consultant
Consultant

Hi @chris 


Assuming that Base_T is a variable defined in your code you can just remove the quotes enclosing the name.

 

If FcType = "FLAT FACE" Then
	Parameter("d0") = Base_O
	Parameter("d4") = Base_T - Face_Off
Else If FcType = "RAISED FACE" Then
	Parameter("d0") = Base_R
	Parameter("d4") = Base_T
End If
iLogicVb.UpdateWhenDone = True
InventorVb.DocumentUpdate()

 

EESignature

0 Likes
Message 3 of 3

chris
Advisor
Advisor

oh... lol... figured I'd miss something so simple, Thank you, I have no idea why I had quotes around any of those... where is the "hit myself in the forehead" emoji

0 Likes