Custom Values using Radio Button

Custom Values using Radio Button

jam_bhatti
Enthusiast Enthusiast
1,781 Views
8 Replies
Message 1 of 9

Custom Values using Radio Button

jam_bhatti
Enthusiast
Enthusiast

Hello

 

i am trying to edit custom values using multivalue list radio button. clicking first radio button and then 2nd radio button to editing custom values and click  back first radio button the value shown same i was edited 2nd radio button. could be possible to show these value previously which i was assigned for first button.

to understand my question Please watch the video link below.

 

 

http://s0.docspal.com/files/processed/46/7678146-mnoexppm/Cylinder_(new).flv

 

 

0 Likes
1,782 Views
8 Replies
Replies (8)
Message 2 of 9

jam_bhatti
Enthusiast
Enthusiast

Colud any one help in light of my base post.

below the code which i defined.

 

SyntaxEditor Code Snippet

If CyList = 1 Then
Parameter("Cylinder-01-01:1", "THK1") = CTHK
Parameter("Cylinder-01-01:1", "HT1") = CHT
Parameter("Cylinder-01-01:1", "SSA1") = CSSA
THK1 = CTHK
HT1 = CHT
SSA1 = CSSA
End If
If CyList = 2 Then
Parameter("Cylinder-02-01:1", "THK2") = CTHK
Parameter("Cylinder-02-01:1", "HT2") = CHT
Parameter("Cylinder-02-01:1", "SSA2") = CSSA
THK2 = CTHK
HT2 = CHT
SSA2 = CSSA
End If
If CyList = 3 Then
Parameter("Cylinder-03-01:1", "THK3") = CTHK
Parameter("Cylinder-03-01:1", "HT3") = CHT
Parameter("Cylinder-03-01:1", "SSA3") = CSSA
THK3 = CTHK
HT3 = CHT
SSA3 = CSSA
End If

 

 

 

0 Likes
Message 3 of 9

TONELLAL
Collaborator
Collaborator

To simplify the code you can use :

 

i = CyList

 

Parameter("Cylinder-0" & i & "-01:1", "THK" & i) = CTHK

Parameter ("THK" & i) = CTHK

 

 

Hope this help !

Message 4 of 9

jam_bhatti
Enthusiast
Enthusiast

@TONELLAL 

 

Thanks for simplifying the code its really helpfull, but my question still untreated. the values still remain same as last edited by changing Cylist.

 

 

 

0 Likes
Message 5 of 9

VdVeek
Advocate
Advocate

jam_bhatti have a look at this website parameter-dependency-in-ilogic there is an example you can use.

Rob.

Autodesk Inventor 2015 Certified Professional & Autodesk Inventor 2012 Certified Professional.
0 Likes
Message 6 of 9

jam_bhatti
Enthusiast
Enthusiast

@VdVeek

 

I couldn't understand how did i with the reference link logic. if you prepare some coding for my case it will be highly appriciated.

 

Jamil

0 Likes
Message 7 of 9

Vladimir.Ananyev
Alumni
Alumni

iLogic Form API does not support radio buttons events at the moment. If you need more please consider an Inventor AddIn development.

As a workaround you may add an “Apply” button to the Form that could apply parameter changes to the model leaving the form opened.

 

iLogic Form Apply button.PNG

 

If your form is modal then you may additionally check the FormReturnValue after the form was closed.  This gives you an opportunity to process some events like Cancel, OK, or Close button was pressed to exit the form.  Here is an iLogic code snippet:

 

'run for modal form "Form 1"
Dim R As FormReturnValue  = iLogicForm.Show("Form 1", FormMode.Modal)

Dim St As String
Select Case R.Result.tostring
	Case "Cancel"
		st = "Cancel"
	Case "OK"
		st = "OK"
	Case "Close"
		st = "Close"
	Case Else
		st="???  " & R.Result.tostring 
End Select
MsgBox(st)

See attached ipt file.  I’m not sure that I understand your intent properly, but hope this helps a little.

Btw, your video link does not work 😞

 

cheers,


Vladimir Ananyev
Developer Technical Services
Autodesk Developer Network

0 Likes
Message 8 of 9

jam_bhatti
Enthusiast
Enthusiast

 

Thanks to answering but still un-solved. 

Radio button link values need to return show as i assigned previously.

 

Please find the video link below to explain the problem.

http://s0.docspal.com/files/processed/15/7740015-xkxygogx/Cylinder_(new).flv

 

 

 

 

0 Likes
Message 9 of 9

Vladimir.Ananyev
Alumni
Alumni

Thanks for the video.  At the absence of the radio buttons events the only thing is to use a special iLogic rule that is invoked by the Apply button (or the Cylinders  parameter) and synchronizes all your dimensions according to the current Cylinders value.


Vladimir Ananyev
Developer Technical Services
Autodesk Developer Network

0 Likes