Difference between revisions of "VS:GetMarkerChoice"

From Vectorworks Developer
Jump to: navigation, search
m (1 revision)
(add replacement routine)
Line 135: Line 135:
 
<seeAlso>
 
<seeAlso>
 
VS Functions:
 
VS Functions:
[[VS:SetMarkerChoice]]  
+
* [[VS:SetMarkerChoice]]
 +
* [[VS:GetMarkerValue]]
 
</seeAlso>
 
</seeAlso>
  
 
-----------------------------------------------------------------------------------------------------------
 
-----------------------------------------------------------------------------------------------------------
 
<version>
 
<version>
GetMarkerChoice is obsolete as of VectorWorks13.0<P>
+
GetMarkerChoice is obsolete as of VectorWorks 13.0
  
 
+
Availability: from VectorWorks 12.0
Availability: from VectorWorks12.0
+
  
 
</version>
 
</version>

Revision as of 23:31, 16 June 2015

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


Description

OBSOLETE procedure for VW2008

Get current choice for Marker popup dialog control.

PROCEDURE GetMarkerChoice(
dialogID  :LONGINT;
itemID  :LONGINT;
VAR index  :INTEGER;
VAR style  :INTEGER;
VAR angle  :INTEGER;
VAR size  :REAL);
def vs.GetMarkerChoice(dialogID, itemID):
    return (index, style, angle, size)

Parameters

dialogID LONGINT
itemID LONGINT
index INTEGER
style INTEGER
angle INTEGER
size REAL

Example

VectorScript

PROCEDURE Example;
VAR
int, dialogID   :INTEGER;
index, style, angle :INTEGER;
size :REAL;

PROCEDURE Dialog_Handler(VAR item :LONGINT; data :LONGINT);
BEGIN
CASE item OF
SetupDialogC:
BEGIN
index := 1;
style := 2;
angle := 3;
size  := .125;
SetMarkerChoice(dialogID, 4, index, style, angle, size);
END;
5: 
BEGIN
GetMarkerChoice(dialogID, 4, index, style, angle, size);
AlrtDialog(Concat(
'index: ', index, Chr(13), 
'style: ', style, Chr(13), 
'angle: ', angle, Chr(13), 
'size: ', size));
END;
END;
END;

BEGIN
dialogID := CreateLayout('Test', FALSE, 'OK', '');
CreateMarkerPopup(dialogID, 4);
CreatePushButton(dialogID, 5, '  Display Values  ');
SetFirstLayoutItem(dialogID, 4);
SetBelowItem(dialogID, 4, 5, 0, 2);
int := RunLayoutDialog(dialogID, Dialog_Handler);
END;
RUN(Example);

Python

def Dialog_Handler( item , data ):	
	if item ==	SetupDialogC:
		index = 1
		style = 2
		angle = 3
		size  = .125
		vs.SetMarkerChoice(dialogID, 4, index, style, angle, size)
	elif item == 5: 		
		vs.GetMarkerChoice(dialogID, 4, index, style, angle, size)
		vs.AlrtDialog(vs.Concat(
		'index: ', index, vs.Chr(13), 
		'style: ', style, vs.Chr(13), 
		'angle: ', angle, vs.Chr(13), 
		'size: ', size))


def Example():
	global dialogID
	global SetupDialogC
	SetupDialogC = 12255
	dialogID = vs.CreateLayout('Test', False, 'OK', '')
	vs.CreateMarkerPopup(dialogID, 4)
	vs.CreatePushButton(dialogID, 5, '  Display Values  ')
	vs.SetFirstLayoutItem(dialogID, 4)
	vs.SetBelowItem(dialogID, 4, 5, 0, 2)
	intt = vs.RunLayoutDialog(dialogID, Dialog_Handler)

Example()

Version

GetMarkerChoice is obsolete as of VectorWorks 13.0

Availability: from VectorWorks 12.0

See Also

VS Functions:
VS Functions:
  • [[VS:SetMarkerChoice]]
  • [[VS:GetMarkerValue]]
Personal tools
NamespacesFFFF

Variants
Actions
Advanced Search
See Also
Navigation
Toolbox