Community
Inventor Programming - iLogic, Macros, AddIns & Apprentice
Inventor iLogic, Macros, AddIns & Apprentice Forum. Share your knowledge, ask questions, and explore popular Inventor topics related to programming, creating add-ins, macros, working with the API or creating iLogic tools.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

No Zoom effect on TransientGraphics

4 REPLIES 4
SOLVED
Reply
Message 1 of 5
NemKumar
414 Views, 4 Replies

No Zoom effect on TransientGraphics

Hi,

 

How do I achieve no zoom effect on ClientGraphics like the arrow nodes which appers when some pull, push operation is there.?

It rotates and pan but it doesnt zoom.

 

Thanks,

4 REPLIES 4
Message 2 of 5
xiaodong_liang
in reply to: NemKumar

Hello,

Sorry for letting you wait.

Did you mean you implement your own arrow by ClientGraphics? the arrow can be rotated and panned, but cannot be zoomed? I am struggling to understand the scenario. Could you provide a code demo, and a snapshot to help me to understand? Thank you!
Message 3 of 5
NemKumar
in reply to: xiaodong_liang

I have drawn my own arrow using clientgraphics. It can be zoomed , panned and rotated like normal clientgraphics. What I want to have is no zoom effect on it like the pull push draggers which appear while extrusion or revolve etc. 

 

In the snapshots attached, Inventor's native arrow draggers have no zoom effect on them as shown. I want this no zoom effect on my own clientgraphics arrow.

 

I hope my query is clear. Feel free to ask if you want more details.

 

Thanks

 

Message 4 of 5
xiaodong_liang
in reply to: NemKumar

Hello,

I see now.

so, you can use Graphics.SetTransformBehavior to control the behavior when camera is changing. e.g. the code piece below can allow the graphics pan, rotate, but it will always be anchored to (0,0,0) and size is always the original size. For more info on SetTransformBehavior, please refer to API help.

oSurfaceGraphics.SetTransformBehavior ThisApplication.TransientGeometry.CreatePoint(0, 0, 0), kPixelScaling, 1
Message 5 of 5
NemKumar
in reply to: xiaodong_liang

Hi,

 

Thanks for your answer. Just to extend my query.

 

I am using kNoTransformBehaviour for keeping the size of the arrow relative to the screen. So I am drawing the arrow in the sizes of 5 to 10 pixel units.

It works fine. Just one thing, when I click home button, graphics node of the arrow is also considered for fit to window. Arrow is shown big and the part is shown small.

 

How do I restrict clientGraphics from getting included in fit to window calculations.

Here is the image attached.

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

Post to forums  

Autodesk Design & Make Report