VS:SetLS: Difference between revisions

From Vectorworks Developer
Jump to navigation Jump to search
m (1 revision)
 
(add remark: missing complex line types)
Line 43: Line 43:
-----------------------------------------------------------------------------------------------------------
-----------------------------------------------------------------------------------------------------------
<remark>
<remark>
[[User:Orso.b.schmid|Orso]] (2011.05.19): Since VW 2010 the max number of Dash styles increased to 128, thus the limit is now theoretically -128 and not -8. It is to be minded that the function will rise a warning if the dash style index passed doesn't exist. This can happen when users deleted them.  
[[User:Orso.b.schmid|Orso]], 2014.04.08:  This Routine can be considered partly obsolete from VW 2013 (VW 18) since it will ignore complex line types. Use [[VS:SetLS>N| SetLSN]] instead.
 
[[User:Orso.b.schmid|Orso]], 2011.05.19: Since VW 2010 the max number of Dash styles increased to 128, thus the limit is now theoretically -128 and not -8. It is to be minded that the function will rise a warning if the dash style index passed doesn't exist. This can happen when users deleted them.  


Thus the secure range to be used is: -1 to -[[VS:NumDashStyles| NumDashStyles]].
Thus the secure range to be used is: -1 to -[[VS:NumDashStyles| NumDashStyles]].
Line 79: Line 81:
SetLS(ObjHandle, 0)</code>
SetLS(ObjHandle, 0)</code>
</sample>
</sample>


-----------------------------------------------------------------------------------------------------------
-----------------------------------------------------------------------------------------------------------
Line 85: Line 88:


</version>
</version>


-----------------------------------------------------------------------------------------------------------
-----------------------------------------------------------------------------------------------------------
Line 90: Line 94:
[[VS:SetLSN|SetLSN]] from Vectorworks 2013
[[VS:SetLSN|SetLSN]] from Vectorworks 2013
</seeAlso>
</seeAlso>





Revision as of 11:38, 8 April 2014

.VectorScript|VectorScript ..VS:Function Reference|Function Reference ..VS:Function_Reference_Appendix|Appendix

Description

Procedure SetLS sets the linestyle of the referenced object.

If the value is in the range 0 to 71, the specified fill pattern is applied as the linestyle; a value in the range of -1 to -8 will apply the specified linestyle.

Fill patterns and their associated constants can be found in the VectorScript Appendix.

PROCEDURE SetLS(
h :HANDLE;
ls :INTEGER);
def vs.SetLS(h, ls):
    return None

Parameters

h HANDLE Handle to object.
ls INTEGER Linestyle to apply to object.

Remarks

Orso, 2014.04.08: This Routine can be considered partly obsolete from VW 2013 (VW 18) since it will ignore complex line types. Use [[VS:SetLS>N| SetLSN]] instead.

Orso, 2011.05.19: Since VW 2010 the max number of Dash styles increased to 128, thus the limit is now theoretically -128 and not -8. It is to be minded that the function will rise a warning if the dash style index passed doesn't exist. This can happen when users deleted them.

Thus the secure range to be used is: -1 to - NumDashStyles.

Example

PROCEDURE Example;
VAR
    cnt :INTEGER;
BEGIN
    PushAttrs;

    TextSize(1);
    TextJust(3);
    TextVerticalAlign(3);

    FOR cnt := -10 TO 71 DO BEGIN
        TextOrigin(-2, cnt);
        CreateText(Concat(cnt));
        MoveTo(0, cnt);
        LineTo(24", cnt);

        SetLS(LNewObj, cnt);
    END;

    PopAttrs;
END;
RUN(Example);


{ Assigning none (no pattern) to the object pen. }
SetLS(ObjHandle, 0)

Version

Availability: from All Versions, deprecated from Vectorworks 2013

See Also

SetLSN from Vectorworks 2013

[[VS:SetLSN|SetLSN]] from Vectorworks 2013