# Dynamic dash offset properties of line stroke in script

**URL:** <https://forum.inductiveautomation.com/t/dynamic-dash-offset-properties-of-line-stroke-in-script/20516>\
**Category:** Ignition\
**Created:** [November 3, 2018, 2:17pm UTC](https://forum.inductiveautomation.com/t/dynamic-dash-offset-properties-of-line-stroke-in-script/20516 "2018-11-03T14:17:55Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![nader.chinichian](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/nader.chinichian/32/9261_2.png) [@nader.chinichian](https://forum.inductiveautomation.com/u/nader.chinichian)\
**Post date:** [November 3, 2018, 2:17pm UTC](https://forum.inductiveautomation.com/t/dynamic-dash-offset-properties-of-line-stroke-in-script/20516/1 "2018-11-03T14:17:55Z")

</div>

Hi  
I want to access dash offset property in stroke style of a line in python script but there is no direct option for it.  
Can someone guide me how to do this? or where should I search for docs related to this?

![](https://us1.discourse-cdn.com/inductiveautomation/original/2X/e/e942b1c81d7e637c72df6cdf1353acfdeddcb7a9.jpg)

Thanks.

---

<div class="post-metadata">

**Author:** ![JordanCClark](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/jordancclark/32/83362_2.png) [@JordanCClark](https://forum.inductiveautomation.com/u/JordanCClark)\
**Post date:** [November 5, 2018, 12:53pm UTC](https://forum.inductiveautomation.com/t/dynamic-dash-offset-properties-of-line-stroke-in-script/20516/2 "2018-11-05T12:53:11Z")

</div>

This should point you in the right direction. 🙂

> [@How to Bind Line Width (a part of Stroke Style)?](http://forum.inductiveautomation.com/t/how-to-bind-line-width-a-part-of-stroke-style/10194/2):
>
> Hi! The Stroke Style is a java.awt.BasicStroke construct. From the [docs.java.com](http://docs.oracle.com/javase/7/docs/api/java/awt/BasicStroke.html#createStrokedShape%28java.awt.Shape%29): [This website](http://docstore.mik.ua/orelly/java-ent/jfc/ch04_05.htm) has a pretty fair explanation of the different style options. I made up a window that illustrates all five methods. That way, you can decide case-by-case what will work best for you. slight_smile[Stroke Styles Demo\_2018-11-05\_0746.proj](https://us1.discourse-cdn.com/inductiveautomation/original/2X/8/895f3d53fe92ade1576c0f686ed3f22ea5af77f7.proj) (16.3 KB) Project scripts for construction or inspection. Described in posts below. [stroke\_2017-08-01\_0533.proj](https://us1.discourse-cdn.com/inductiveautomation/original/2X/7/72bf07d771e17779f42c4cfcc1564941de56bb1d.proj) (1.9 KB) EDIT: File re-uploaded… again…

---

<div class="post-metadata">

**Author:** ![nader.chinichian](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/nader.chinichian/32/9261_2.png) [@nader.chinichian](https://forum.inductiveautomation.com/u/nader.chinichian)\
**Post date:** [November 5, 2018, 2:12pm UTC](https://forum.inductiveautomation.com/t/dynamic-dash-offset-properties-of-line-stroke-in-script/20516/4 "2018-11-05T14:12:54Z")

</div>

Thanks Jordan

Where can I find documentation of setStrokeStyle() there is no info ignition manual and java docs link you mentioned above.

---

<div class="post-metadata">

**Author:** ![JordanCClark](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/jordancclark/32/83362_2.png) [@JordanCClark](https://forum.inductiveautomation.com/u/JordanCClark)\
**Post date:** [November 5, 2018, 2:53pm UTC](https://forum.inductiveautomation.com/t/dynamic-dash-offset-properties-of-line-stroke-in-script/20516/5 "2018-11-05T14:53:11Z")

</div>

The [SDK javadoc](http://files.inductiveautomation.com/sdk/javadoc/ignition79/795/index.html), specifically [here](http://files.inductiveautomation.com/sdk/javadoc/ignition79/795/com/inductiveautomation/vision/api/client/components/shapes/PathBasedVisionShape.html#setStrokeStyle-java.awt.Stroke-).

My first goto, however is to use @pturmel's introspect() script. Still as handy today as it was back then. 🙂

> [@Finding all available methods from a component](http://forum.inductiveautomation.com/t/finding-all-available-methods-from-a-component/9670/2):
>
> I’ve attached the introspect() function that I wrote years ago (in the FPMI days). Still handy today. I suggest you load it as a shared module, then call it like: powerTable = event.source.parent.getComponent('Power Table') shared.inspect.introspect(powerTable) inspect.py (3.09 KB) Edit: Link expired. Use the version shown below.
