Resetting parameter value?

Resetting parameter value?

alikhan.ganayev
Enthusiast Enthusiast
853 Views
3 Replies
Message 1 of 4

Resetting parameter value?

alikhan.ganayev
Enthusiast
Enthusiast

So a quick explanation to understand the context this question is in. I have a part that is split into 3 pieces with workplanes. These 3 pieces are derived from one part. In a larger assembly these 3 pieces are constrained back the same way.

zijwang1.PNG

The base component as explained above.

I expect questions asking me why I even made it this way. I did not make it this way but I've been tasked with making a product configuration for this larger assembly. 

zijwang3.PNG

Each of these derived parts can only be a max of 2.9 m in length.

zijwang2.PNG

Derived middle part.

The thing that makes this assignement tricky is that I have to be able to freely alter the length but because of the restrictions on the maximum length of the derived part I'll have to add another middle part as seen above to the already existing three.  This I plan to achieve by just using model states and have the rule switch between them depending on the total length. When the base component reaches the maximum length of let's say 7750 mm another middle part has to be added but the length has to be reset to to its starting value tp make up for the added part. My questions is if there is a way to reset a value. I already considered working with a min and max value by having the value equal the min or max once it crosses that border but that wouldn't solve the problem either. Another issue is that It would also need to keep aading up. So let's say it's at 7700 mm and I add another 100 mm, it would need to go to 6360 mm then. I'm mostly interested in knowing if there is a way to reset a value but thought I'd provide the context. Also this is just an idea, if anyone has a better one, shoot. Inventor 2022/Windows 10.

 

0 Likes
854 Views
3 Replies
Replies (3)
Message 2 of 4

WCrihfield
Mentor
Mentor

Hi @alikhan.ganayev.  When the overall length goes beyond the limit of using just one middle part, and a new middle part is then included, do you plan to keep one middle part full length, then have the second part shortened (somehow), or do you intend for both middle parts to remain equal lengths?  Are the lengths of the start part and end part a set size that will not change when overall length changes?  Also, what is your plan for making part length changes...where is that length change happening...at assembly level only...at part level, etc?

Wesley Crihfield

EESignature

(Not an Autodesk Employee)

0 Likes
Message 3 of 4

alikhan.ganayev
Enthusiast
Enthusiast
I think it's easier to just have everything shortened. All three parts are not the same length but for the sake of simplicity I have altered the parameters of the work planes used to divide the base component to keep the same proportions when the total length is altered. My problem is that I would like to, for example, change the value from 7700 to 7800, it would give me a value of 6360. As the range would be 6310 to 7750, the remaning that didn't add up to the max value, would count up starting from the min value. I really wonder if this is even possible at all. I assume I'd have to work with some incremental value somehow. I know it sounds really vague.
0 Likes
Message 4 of 4

alikhan.ganayev
Enthusiast
Enthusiast

Just wanted to update in case someone runs into the same problem. I've achieved this through the only means possible: excel. Just through some simple calculations and figuring out how long the base component had to be in order for the total length to take on the desired value. I'll add the document to this message. I also used this code. The LengthBaseComponent is a model parameter of the base component and Length is a user parameter which I added and control from another assembly.

 

Dim sFile As String = "C:\Users\MyName\Desktop\BP\Conveyor belt\length.xlsx"

GoExcel.Open("length.xlsx", "Standard")

GoExcel.FindRow(sFile, "Standard", "TotalLength", "<=", Length)

LengthBaseComponent = GoExcel.CurrentRowValue("LengthBaseComponent")

GoExcel.Close

 

 

0 Likes