-
Posts
1,194 -
Joined
-
Last visited
Content Type
Profiles
Forums
Events
Articles
Marionette
Store
Posts posted by Sam Jones
-
-
Not in my local 2021 version, but I'll go back and download and see if I get something newer.
-
The URL is what I needed. Even after emptying the cache, I can't get Safari to go to that version of the online Function Reference without clicking on the URL shown above.
-
Is it possible for VS to get the structural units of a .vwx file?
-
Josh, and perhaps Vlado and Kevin could way in,
Paragraph 1
I get the conceptParagraph 2 brings up a set of questions.
Question 1
Does this mean that the "LDevice_GetParamStr()" calls can be substituted for the "GetRField()" calls wherever there is a check mark in the "Multi-cell" or "Accessory" columns?
Question 2
Would the following be true?
"LDevice_SetParamStr(FixtureHandle, -1, -2, 'Breaker ID', '34');"
and
"SetRField(FixtureHandle, 'Breaker ID', '34');"
are both syntactically correct
and
are effectively the same statementsQuestion 3
Does an ETC Source 436 fixture have 1 cell whose index would be 0?Question 4
If so, when considering an ETC Source 436 fixture are the following statements syntactically valid and effectively equivalent?
"LDevice_SetParamStr(FixtureHandle, -1, -2, 'Breaker ID', '34');"
"LDevice_SetParamStr(FixtureHandle, 0, -2, 'Breaker ID', '34');"
"SetRField(FixtureHandle, 'Breaker ID', '34');"Question 5
If not, why not?Question 6
What does "LDevice_ReleaseRes;" do?Question 7 (4 parts)
What does the following do?
LDevice_DlgResource(
LayoutID :INTEGER;
ControlID :INTEGER;
SymbolName :STRING);
what layout?
what control?
symbolName of what? -
Glad you figured it out. To me, it was the a question of "Universal Name" of what since I would be passing the handle to the lighting device and not the accessory.
Good for you, and thanks.
-
8 minutes ago, Jesse Cogswell said:
I also knew that the universal name would be "Symbol Name" (which also appears in your list of parameters above, halfway down between "Brightness" and "Use Legend").
First of all I'm super glad that you found away to get the symbol name of the accessory, but the symbol name that you reference above and that I reference in the lighting device parameter list is the symbol used by the lighting device that has the accessory not the accessory. GetRField(ObjHandle, 'Lighting Device', 'Symbol Name'). Once I test it, I will use what you have figured out to reference bunch of stuff (I hope).
-
19 minutes ago, Jesse Cogswell said:
so if you have a list of the Lighting Device parameters handy, you should be able to get all the parameters you need.
Thank you for the pointer. I will try it out, however. Below is the list of LD parameters that I have and no where does the syntax that are using shows up. Where is "cell index", "accessory index", and "Symbol Name". I can use "Symbol Name to get the symbol name of the lighting device that has accessories.
Though I haven't tried it yet, I'm confident that your use of ...GetParamStr works, but how did you think to use it in the way that you did, because to me there is not hint about doing that that I can derive from the LD parameter list.
Lighting Device
Universal
Device Type
Inst Type
Edit Cell
Edit Accessory
FixtureID
Old Inst Type
Gobo Data
Color Data
Color Flag Data
Fixture Mode
Old Fixture Mode
Vision Lit Override
Vision Fixture Name
GDTF Fixture Name
GDTF Fixture Mode
GDTF Fixture Type ID
GDTF Fixture Custom ID
GDTF CIE Color
Wattage
Purpose
Position
Unit Number
Color
Dimmer
Absolute Address
Channel
UniverseAddress
Universe
DMX Address
Num Channels
Circuit Number
Circuit Name
System
User Field 1
User Field 2
User Field 3
User Field 4
User Field 5
User Field 6
Voltage
Breaker ID
Time
Cost
Frame Size
Field Angle
Field Angle 2
Beam Angle
Beam Angle 2
Weight
Template
TemplateRot1
Template2
TemplateRot2
Gobo Shift
Mark
Draw Beam
Draw Beam as Solid
Use Vertical Beam
Show Beam at
Fall off distance
Lamp Rotation Angle
Top Shutter Depth
Top Shutter Angle
Left Shutter Depth
Left Shutter Angle
Right Shutter Depth
Right Shutter Angle
Bottom Shutter Depth
Bottom Shutter Angle
Light On
Lit Fog
Brightness
Symbol Name
Use Legend
Legend View 3D
Flip 3D Top Bottom
Flip 3D Left Right
Rotate 3D Legend
Flip Front Back
Flip Left Right
Focus
Pan
Tilt
Throw Distance
Rotate3DPosition
xRot
yRot
EnableZRot
zRot
zRot2D
Focus Angle Vertical
Focus Angle Horizontal
Angle To Face Plane
Off Axis Angle
ShowData
Ganged With
Use Active Symbol
ControlPoint01X
ControlPoint01Y
ControlPoint02X
ControlPoint02Y
ControlPoint03X
ControlPoint03Y
ControlPoint04X
ControlPoint04Y
ControlPoint05X
ControlPoint05Y
ControlPoint06X
ControlPoint06Y
ControlPoint07X
ControlPoint07Y
ControlPoint08X
ControlPoint08Y
X Location
Y Location
Z Location
Do Not Edit
Alt-Chan
Alt-Dim
Alt-Unit
Alt-Circ
Is New
__Version
NoExport
Lightwright ID
RGBColor
UID
__CommPasteName
__LabelHandlesData
__LabelHandles3DData
__CellsCount
__AccessoriesCount
Dimension
UseGDTFGeometry
WeightDouble
Edit GDTF Data
-
How do I get the symbol name of an accessory that is attached to a light at a given cell index and accessory index? There does not seem to be a parameter to query.
-
Unfortunately, I cannot get that to work. This code from the developer wiki fails to allow the selection of a .vwx file.
PROCEDURE Example;
VAR
fileName, title :STRING;
defaultFolder :STRING;
mask :STRING;
BEGIN
title := 'Select the object library file...';
defaultFolder := '';
mask := '*.vwx';
fileName := 'Drafting Tools.vwx';
IF GetFileN(title, defaultFolder, mask, fileName) THEN
AlrtDialog(fileName);
END;
RUN(Example);
-
I don't see how these help. They don't let the user look around their hard disk for the file they want to get resources from. With "PutFile", the user can look around their hard disk for the text file they desire. Perhaps, you have nifty little algorithm that simulates this functionality for finding .vwx files?????
-
It is possible to import resources from a file into the current file. There are a variety of ways to do this with BuildResourcList() and ImportResourceToCurrentFile() and CopySymbol(). All of these require that the script maker know the file name or folder name containing the resource. Is it possible to present the user with a Finder brower or Director trouser similar to the one presented with the PutFile() command? I would like to present the user with a way to find a file or folder from which to import resources. Possible ??
-
How do I set the selection of elements in a List Box?
The set up dialog creates a list box with
CreateListBoxN( dialog, kLabelLegendList, 35, 10, TRUE );
I have a button in the dialog that wants to select all the elements of the list box; however,
kSelectAllBtn:
BEGIN
FOR index := 1 TO NumLLs DO
SelectChoice(dialog, kLabelLegendList, index, TRUE);
END;
selects nothing in the list box.kSelectAllBtn:
BEGIN
SetSelectionRange(dialog, kLabelLegendList, 0, NumLLs);
END;selects nothing in the list box.
I have checked to be sure that I am entering the kSelectAllBtn case in the Case statement that polls items in the dialog handler.
-
At that level, the binary math is not that foreign to me and pretty straight forward. I keep needing to wrap my head around the "anding" of boolean values, but it ends up being pretty simple. I needed the routine above that Kevin provided to extract the values from the integers yielded by the function.
I confess that Julian generously and privately offered a simpler solution, but I was/am pissed off that the documentation let put out what I thought was a simple solution that totally hosed my student users and without my knowledge.
-
Thank you Kevin,
To clarify for later vectorscript users:
PROCEDURE TestCurrentMode;
{DEBUG}CONST
kcr = chr(13);
Educational = 4;
Student = 8;
Banner = 64;
WaterNewFiles = 128;
PrintWatermark = 256;
SaveEd = 512;
OpenEd = 1024;
BetaSerial = 4096;
VAR
VWMode :LONGINT;
IsFull :BOOLEAN;
IsEd :BOOLEAN;
IsStudent :BOOLEAN;
IsMakeWater :BOOLEAN;
IsPrintWater :BOOLEAN;
IsBanner :BOOLEAN;
IsBeta :BOOLEAN;
{================================================================================}
FUNCTION BitSet(largeNum, smallNum :LONGINT) :BOOLEAN;
{Returns true if smallNum is a power of 2 present in largeNum.}
VAR
bit :INTEGER;
BEGIN
BitSet := FALSE;
bit := 15;
WHILE bit > -1 DO
BEGIN
IF largeNum >= (2 ^ bit) THEN {IF vwMode >= 2 to the power of bit}
BEGIN
largeNum := largeNum - (2 ^ bit); {Strip large bit off largeNum (off of vwMode)}
IF (2 ^ bit) = smallNum THEN {IF 2 to the power of bit = smallNum (2 ^bit = smallNum[requested test number])}
{requested is mode found in wvMode }
BEGIN
{END while loop. }
BitSet := TRUE;
bit := 0;
END; {IF (2 ^ bit) = smallNum}
END; {if largeNum >= (2 ^ bit)}
bit := bit - 1; {strip large bit to test next smallest bit}
END; {while bit > -1 }
END; {FUNCTION BitSet}{================================================================================}
BEGIN
vwMode := 456;
vwMode := GetCurrentMode;
IsFull := BitSet(vwMode, 1);
isEd := BitSet(vwMode, Educational);
IsStudent := BitSet(vwMode, Student);
IsMakeWater := BitSet(vwMode, WaterNewFiles);
IsPrintWater := BitSet(vwMode, PrintWatermark);
IsBanner := BitSet(vwMode, Banner);
IsBeta := BitSet(vwMode, BetaSerial);
AlrtDialog(CONCAT('vwMode = ', vwMode, kcr, kcr,'IsFull = ', IsFull, kcr,
'isEd = ', isEd, kcr,
'IsStudent = ', IsStudent, kcr,
'IsMakeWater = ', IsMakeWater, kcr,
'IsPrintWater = ', IsPrintWater, kcr,
'IsBanner = ', IsBanner, kcr,
'IsBeta = ', IsBeta));
END;
RUN(TestCurrentMode);
-
True. So...
-
6 hours ago, Nicolas Goutte said:
You must write something like:
bool( vs.GetCurrentMode() & 8 )"something like:" I'm afraid I need you to be way more specific.
In vectorscript:
VAR
ok : BOOLEAN;
ok := GetCurrentMode & 8
Gives a meaningless result.
As you can see from Patricks response the integer that is returned is "bit packed" and is not any of the values that are shown. It should return the values that are shown. Vlado has stated that changing the function to do so would break already created scripts. At a bare bare minimum, the documentation should explain the results delivered by the function. Ideally a new function, GetCurrentModeN() would work as the current documentation describes. Currently, a coder needs to write a function that does the bit math to unpack the integer. That is math that I do not know, but I have been given an example of a possible function. Or, one has to construct a function that uses a case statement that checks for all the possible results. Now one doesn't need to test 14 squared combinations because some combinations would not make any sense, but still, that's a painful case statement to write and to figure out.
OK this is a bit of whining by someone who doesn't have the bit math knowledge required, but I think it is fair to ask that the documentation describe the results of the function. Currently, the user of that function has no way of testing for results about licensed he does not own. I wanted educational license users to be free of the requirement to register there running copy of my tools, so I wrote a test based on the documentation. I had no way of knowing that the test would fail. Bad.
On 3/30/2021 at 7:29 PM, Pat Stanford said:Sam, it is a bitwise OR. Each bit is used as a flag to indicate what is allowable in a 16 bit byte.
456 in binary is 0000111001000.
Patrick, I would love to know how you figured this out.
-
According to the VS Reference
When I run:
vwMode := GetCurrentMode;
vwMode should have one of the following values
FUNCTION GetCurrentMode:INTEGER ;
Python:
def vs.GetCurrentMode():
return INTEGER
Description:
Returns the current application protection mode.
Return values:
0 - Mode Not Set
1 - Full Mode
2 - Demo Mode
4 - Education Mode
8 - Student Mode
16 - Viewer Mode
32 - Unlicensed Mode
64 - Banner Mode
128 - Watermark New Files Mode
256 - Print Watermark Mode
512 - Save Educational File Format Mode
1024 - Open Educational File Format Mode
2048 - Vector Script Export Mode
4096 - Beta Serial Number ModeIt returns NONE of those. On my machine it returns "2305"
On the one student registration that I checked it retuned "456"
If I need to determine if the running VW program is a student version, how do I do that?
-
How can vectorscript identify a symbol as a Spotlight Label Legend?
Thx.
-
I'm pretty sure this can't be done, but I need to ask.
After building a resource list I want to import only the symbols that are connected to a specified record. Is there a way to do this filter? Or, do I have to import each symbol in the list check for the record and delete symbols that do not have the record. If I do have to do that, how do I delete a symbol definition from a document, DelObject(HandleToSymDefinition)?
-
I don't see an attached message.
-
I just noticed, and way too late, that Lighting Fixtures no longer have an entry in the Name field at the bottom of the OIP. Is there a VS accessible UID for each Lighting Device?
-
Cool. Seems obvious now.
Kevin and Yordan,
Despite what seemed to be some hiccups during the beta period, I think the Accessory implementation is very good. I haven't played with multiple cells yet, so that may be an issue, but both the functions available to the user and to VS seem to work well. I have only one or two tools that I think are necessary for me to make. The VW UI for accessory editing is a little arcane, but once figured out, it is simple and fairly efficient, much better than the old way. Some caviats: I haven't checked the interaction with LW, I haven't used the Instrument Summary yet, and I haven't worked with multiple cells. Those three scare me a bit, but still, good job.
-
The new functions seem to work well. The next question is how can I retrieve the names of the accessory symbols being used?
LDevice_GetParamStr() seems to require a string (universal name) to get a string. I would like to retrieve the name of the symbol being used at a specified accessory index.
Thx
-
On 3/11/2021 at 12:08 PM, Yordan Kostadinov said:
I can confirm there's an issue with both LDevice_SetAccPos2D and 3D, they do not currently work. This will be fixed in the upcoming SP3.
In SP3, build 587753, the code below, which incorporates your correction, does not move the iris that has been placed at the front of the light by Lighting Accessory tool.
Am I doing something wrong, or did the fix not get into SP3?
PROCEDURE MoveAccessory;
{DEBUG}CONST
kcr = chr(13);
VAR
TheLight :HANDLE;
TheAcc :HANDLE;
AccNumber :LONGINT;
AccIndex :LONGINT;
PosX, PosY :REAL;
PosRot :REAL;
Rot3DX :REAL;
Rot3DY :REAL;
Rot3DZ :REAL;Pos3DX :REAL;
Pos3DY :REAL;
Pos3DZ :REAL;
VWAccFile :STRING;
Index :INTEGER;
OK :BOOLEAN;
BEGIN
TheLight := FSActLayer;
AccNumber := LDevice_GetAccCount(TheLight, 0);
IF AccNumber > 0 THEN
BEGIN
AccIndex := 1;
LDevice_GetAccPos2D(TheLight, 0, AccIndex, PosX, PosY, PosRot);
LDevice_GetAccPos3D(TheLight, 0, AccIndex, Pos3DX, Pos3DY, Pos3DZ, Rot3DX, Rot3DY, Rot3DZ);
AlrtDialog(CONCAT('PosY = ', PosY, kcr,
'Pos3DZ = ', Pos3DZ));
PosY := -4.01;
Pos3DZ := -16.08;
LDevice_SetAccPos2D(TheLight, 0, AccIndex, PosX, PosY, PosRot);
LDevice_SetAccPos3D(TheLight, 0, AccIndex, Pos3DX, Pos3DY, Pos3DZ, Rot3DX, Rot3DY, Rot3DZ);ResetObject(TheLight);
END; {IF AccNumber > 0 }
END;
RUN(MoveAccessory)
Lighting Device 3D Rotate
in Python Scripting
Posted
?? What matrix?