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: 

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

2 REPLIES 2
Reply
Message 1 of 3
chris
119 Views, 2 Replies

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

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

 

 

2 REPLIES 2
Message 2 of 3
Curtis_Waguespack
in reply to: chris

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()

 

Message 3 of 3
chris
in reply to: chris

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

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

Post to forums  

Technology Administrators


Autodesk Design & Make Report