Fusion Manage Forum
Welcome to Autodesk’s Fusion Manage (formerly Fusion 360 Manage) Forum. Share your knowledge, ask questions, and explore popular Fusion Manage topics.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Script That LOOKS UP Data

4 REPLIES 4
SOLVED
Reply
Message 1 of 5
obourne
602 Views, 4 Replies

Script That LOOKS UP Data

I'm writing a script that will look at a item field for a code that was enetered at the item creation. Based upon that code the script will "look up" some data in a table or something and use that data in the scripted routine (in this case it will be populating milestine dates).

 

What's the best way to have a script "look up" data? Via another workspace, external file ect.?

 

FYI The idea is that we classify our tasks/workflows by a code. That code indicates a certain period allowed before enetering the various workstates. For example: code A means you have 1 week to enter state "1", 1 week to enter state "2" etc. Code B means you have 2 weeks for each state, Code C......3 weeks and so on. This way when the item is created we can just pick a code and not have to fill in every detail for the milestones.

4 REPLIES 4
Message 2 of 5
jpiggee
in reply to: obourne

Orrin,

 

I would think this could be solved using an “if.. or” statement, or depending on the number of options a “case” statment could work as well.

Joseph Piggee
Fusion 360 Administrator
TPI Composites
jpiggee@tpicomposites.com
Message 3 of 5
obourne
in reply to: jpiggee

That would work too but would create some rather long code as I have dozens of cases to consider. Also, when I modify the data I don't want to have to scan through the script. I'd rather edit a table or something.

 

To be direct, how would I look up an item property in different workspace and pass that item/array to my current workspce via scripting?

Message 4 of 5
jpiggee
in reply to: obourne

Orrin,

 

You could have a separate Workspace that holds an index of sort, and based on the inputted information it could reference this workspace which in turn could direct the script to look for the proper information, be it a grid or another record. An example of this can be seen in the custom number gen with in the base tenant.

 

However in either case, I would look at reducing the automation as the time out possibility or fault locations on this could be quite painful for you in the long run.

Joseph Piggee
Fusion 360 Administrator
TPI Composites
jpiggee@tpicomposites.com
Message 5 of 5
obourne
in reply to: jpiggee

I followed your suggestion and it works well enough. My Java programmer likes it too so we will proceed that way.

 

Cheers!

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

Post to forums  

Autodesk Design & Make Report