| Welcome, Guest |
You have to register before you can post on our site.
|
| Forum Statistics |
» Members: 5,542
» Latest member: Seth Bray
» Forum threads: 6,314
» Forum posts: 52,574
Full Statistics
|
| Online Users |
There are currently 361 online users. » 0 Member(s) | 357 Guest(s) Applebot, Baidu, Bing, Google
|
| Latest Threads |
Vertex precision
Forum: Official File Specifications/Standards
Last Post: Orion Pobursky
9 hours ago
» Replies: 5
» Views: 1,587
|
LEGO Parts Guide - Only 6...
Forum: Part Requests
Last Post: tom alphin
10 hours ago
» Replies: 5
» Views: 215
|
98138pb0.dat is missing i...
Forum: Parts Authoring
Last Post: Magnus Forsberg
Yesterday, 15:31
» Replies: 2
» Views: 103
|
How can I install on linu...
Forum: Help
Last Post: Orion Pobursky
Yesterday, 4:48
» Replies: 1
» Views: 76
|
Castle Ninja / Robber
Forum: Part Requests
Last Post: Carl Rodabaugh
Yesterday, 1:06
» Replies: 0
» Views: 70
|
help finding ldraw for el...
Forum: Help
Last Post: Brian H
2025-12-30, 23:22
» Replies: 2
» Views: 112
|
Missing Opal Trans Yellow
Forum: Official File Specifications/Standards
Last Post: Philippe Hurbain
2025-12-30, 19:27
» Replies: 3
» Views: 252
|
LEGO Icons 2025
Forum: Official Models
Last Post: Philippe Hurbain
2025-12-30, 9:53
» Replies: 4
» Views: 5,084
|
Minifigure, Head Brown Ey...
Forum: Part Requests
Last Post: Philippe Hurbain
2025-12-30, 9:20
» Replies: 2
» Views: 159
|
Technic 1992
Forum: Official Models
Last Post: Takeshi Takahashi
2025-12-28, 19:34
» Replies: 29
» Views: 42,265
|
|
|
| Lua - prompt and wait for selection? |
|
Posted by: David Manley - 2021-09-25, 4:23 - Forum: LDraw Editors and Viewers
- Replies (20)
|
 |
Hi Roland,
another LDCad scripting question for you.
I'm trying to write a script which will loop, prompt the user to select a particular part and then wait until the part is selected before moving to the next prompt/part selection. Looking through the sample Lua scripts, they seem to expect any part selections to be done prior to invoking the macro. But I'd like to have a script which will prompt the user as they go, so they don't have to remember the order in which to select the parts.
The Lua script I am using is invoked as a macro and looks something like this (it has been simplified to assist in understanding its purpose):
Code: -- Clear the current selection (if there is one).
local selected_item_lo = ldc.session.getCurrent():getSelection()
if (selected_item_lo ~= nil) then
selected_item_lo:remove()
end
-- Prompt for the appropriate part.
prompt_ls =
{
'Select the part/subfile which drives the rotation.'
}
linkage_phase_si = linkage_phase_si + 1
ldc.dialog.runMessage(prompt_ls[linkage_phase_si]);
-- Loop until an item is selected.
repeat
selected_item_lo = ldc.session.getCurrent():getSelection()
until (selected_item_lo:getRefCount() == 1)
ldc.dialog.runMessage('Done')
Basically, the intention of the script is to display a message dialog and, once the dialog is closed, wait until the user selects a part. However, when attempting to run this macro, the console open and displays the message
Code: "linkage_parts_select_gf" execution exceeded the maximum duration of 250ms.
linkage_parts_select_gf is the name of my macro containing the script.
Is there a "proper" way to achieve what I'm wanting to do (i.e. wait until a part is selected) using the LDCad Lua scripting?
Regards,
David
|
|
|
| setEvent, 'run' and passing parameters to macro? |
|
Posted by: David Manley - 2021-09-25, 1:45 - Forum: LDraw Editors and Viewers
- Replies (2)
|
 |
Hi Roland,
with 1.7 scripting API in LDCad, is it possible to pass an argument to a macro when it is run? For example, if I have a macro named:
Code: linkage_parts_select_gf
which has a single argument
can a value be passed via the setEvent API e.g.
Code: macro_lo:setEvent('run', 'linkage_parts_select_gf', '1')
Regards,
David
|
|
|
| Cannot Find my LDraw Library... |
|
Posted by: G.D. Grant - 2021-09-23, 13:46 - Forum: Help
- Replies (2)
|
 |
Prepare to hear something ridiculous...
I lost my LDraw library. Can't remember where I put it on my PC anymore.
I remember doing a manual installation for some nerdy reason and, therefore, my parts library is perhaps not at the default location where the AIOI would have put it...
Is there any way to find the folder where I put my official parts via any LDraw program's preferences settings? I currently have LDView, LDCad, MLCad and LeoCAD installed (all are working properly.) I would like to find my parts library for two main reasons: LPub3D is begging me to, and I would like to add custom parts to it as well.
Thanks in advance for any help.
Cheers. ?
--
G.D. Grant
|
|
|
| Problem with part 2907 |
|
Posted by: N. W. Perry - 2021-09-22, 3:02 - Forum: Parts Tracker Discussion
- Replies (5)
|
 |
If I'm not going mad, there's something amiss with part 2907 in the library.
Check out the Rebrickable entry—all the images there, even their rendering of the LDraw part, show the grooves rotated 22.5° from where they are in the actual library part. Did this get changed during some update? Is there a different version of the part somewhere else?
From the photo, it's clear that the grooves, not the fins, should be at the 8 compass points.
|
|
|
Can't Export SVG Image from LDView Snapshot? |
|
Posted by: G.D. Grant - 2021-09-21, 14:00 - Forum: LDraw Editors and Viewers
- Replies (1)
|
 |
Greetings all.
Anyone know a way to export an LDraw model render to SVG format? Converting a raster image to a vector after rendering the model can lead to misinterpretations from the converter (e.g. stains instead of lines, etc.) Well... You all know how converting raster to vector goes.
I'd like for the geometry of the model to accurately be interpreted by the SVG image, simply.
I notice SVG exports aren't possible in LDView, unless I'm missing on something(?) It seems as if the only options are PNG, BITMAP and JPEG.
If I'm right about this feature not being available in LDView, is there any other LDraw program that would allow this type of operation?
Thanks in advance for any help.
God bless.
--
G. D. Grant
|
|
|
|