question

yuan zhang avatar image
2 Likes"
yuan zhang asked Phil BoBo commented

Draw custom sizers on BasicTE like ASRSvehicle and Crane

Hi,

I developed a ASRS by BasicTE and configured all the components(Lift,BottomRail,Beam,Car...) in the animation.How can it be like the default ASRS :We can add custom sizers .And when resize the arrow, we can change the size of the components.

attach asrsv20182.fsm

Thanks!

FlexSim 18.2.3
asrs
asrs.png (77.5 KiB)
crane.png (92.1 KiB)
bcte.png (81.9 KiB)
asrsv20182.fsm (19.7 KiB)
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

Phil BoBo avatar image
2 Likes"
Phil BoBo answered Phil BoBo commented

In OnDraw, use setpickingdrawfocus() before drawing a cone in order to set a custom picking value.

See MAIN:/project/library/taskexecuters/Crane>behaviour/cppfunctions/onDraw(treenode view)

Then in OnDrag, use getpickingdrawfocus() to see what is being dragged and adjust various components accordingly.

See MAIN:/project/library/taskexecuters/Crane>behaviour/cppfunctions/onDrag(treenode view)

· 2
5 |100000

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

yuan zhang avatar image yuan zhang commented ·

Hi @phil.bobo

Thank you very much!I tried to use these command to have a function test , but nothing worked.Maybe i use them in a wrong way.I found commands like drawobjectpart in onDraw coden and i don't know how to understand and use.

So could you give me an application case about this issue. Any advise or excamples will be appreciated!

0 Likes 0 ·
20190806180511.png (97.6 KiB)
Phil BoBo avatar image Phil BoBo ♦♦ yuan zhang commented ·

drawobjectpart() is a C++ function. Unless you are writing your code in C++ with access to that function, then you'll need to use something else to draw a cone, such as the drawcolumn() FlexScript function or the Mesh API.

Please post an example model showing what you've tried and what isn't working if you want more specific help in explaining what is wrong.

0 Likes 0 ·