question

Ryosuke S avatar image
0 Likes"
Ryosuke S asked Jason Lightfoot edited

Problem setting size of AGVPath by FlexScript

I'm having problem setting the size of AGVPath. For example, I'd like to create a path starting from (0,0,0) ending (0,0,1) which means 1 meter vertical path staring at (0,0,0). I tried several ways, but doesn't seem to be working. Am I using the path.size incorrectly?

AutomatePathCPCreate_Basic.fsm

FlexSim 20.1.3
flexscriptflexsim 20.1.3agvpath
5 |100000

Up to 12 attachments (including images) can be used with a maximum of 23.8 MiB each and 47.7 MiB total.

1 Answer

Jason Lightfoot avatar image
1 Like"
Jason Lightfoot answered Jason Lightfoot edited

I've added a user command createAGVstraightPath(<Vec3 start>,<Vec3 end>, [obj container]) to do this. You needed to call "setZ" via function_s.

I would highly recommend you put any function_s calls along with associated logic in a user command so that these can be updated in one place should the code need changing due to a future change in FlexSim.

automatepathcpcreate-basic_jl.fsm


· 3
5 |100000

Up to 12 attachments (including images) can be used with a maximum of 23.8 MiB each and 47.7 MiB total.

Ryosuke S avatar image Ryosuke S commented ·

@jason.lightfoot Thank you for your reply. I still haven't gotten the hang of using the function_s. Is "setZ" in the tree under straight path? I can't seem to find it. Anyway thanks to your help, it worked perfectly, though I'm facing another problem, which I have raised here.

0 Likes 0 ·
Joerg Vogel avatar image Joerg Vogel Ryosuke S commented ·

You don’t find function_s in the model tree. It is only visible in library tree under main.

1 Like 1 ·
Jason Lightfoot avatar image Jason Lightfoot ♦♦ Ryosuke S commented ·

StraightPath inherits from Path.

Update: Fixed function uploaded.

0 Likes 0 ·