Forum Replies Created
-
AuthorPosts
-
Péter BaksaKeymaster
Hi Barry,
1, as long as you know the name of the fill, no need to define it. But the default name is localized.
2, I agree, it would be nice. But you would still have to do extra work in GDL to use them.
3, I didn’t try if a rotational and a moveable hotspot can be linked like two moveable hotspots can.
You could also try using a moveable hotspot for the origin, one moveable for the end of the radius, and doing the computations in the background with linked hidden parameters, showing angle/r instead of x/y in the tracker.Péter Baksa
Library Platform, Software Engineer
GRAPHISOFT SEPéter BaksaKeymasterHi John,
The definition part is simple, the trick is in setting up the fill distortion. The transformation matrix used by poly2_b{3} is interpreted differently for gradient fills: the end coordinates of the axes should be given relative to the object origin, not the fill origin.
DEFINE LINEAR_GRADIENT_FILL "gradfill" fill "gradfill" ! fill origin OriginX = 0.5 OriginY = 0.5 ! pattern angle patternAngle = 30 ! size patternSize = 0.5 ! length of gradient from fill pen to background pen poly2_b{3} 4, ! # of edges 1 + 2 + 4 + 8, ! contour + fill + close polygon + local fill orientation 1, 0, ! fill pen, fill background pen OriginX, OriginY, ! fill origin OriginX + patternSize * cos(patternAngle), OriginX - patternSize * sin(patternAngle), ! X of pattern axis X, X of pattern axis Y OriginY + patternSize * sin(patternAngle), OriginY + patternSize * cos(patternAngle), ! Y of pattern axis X, Y of pattern axis Y 0, 0, 1, ! vertices 0, 1, 1, 1, 1, 1, 1, 0, 1
Péter Baksa
Library Platform, Software Engineer
GRAPHISOFT SEPéter BaksaKeymasterHi,
REVOLVE was designed to work with curved profiles, use status code 2 on sharp edges,
roty -90 material mat revolve{2} 10, 0, 360, 4+8, mat, 0, 1, 2, mat, ! sharp edge 0, 2, 1, mat, ! smooth edge, contour not shown 0.02, 2.05, 1, mat, 0.05, 2.08, 1, mat, 0.1, 2.1, 0, mat, ! smooth edge, contour shown 0.9, 2.1, 0, mat, 0.95, 2.08, 1, mat, 0.98, 2.05, 1, mat, 1, 2, 1, mat, 1, 1, 2, mat del 1
This means you can’t have a sharp edge without a contour.
Péter Baksa
Library Platform, Software Engineer
GRAPHISOFT SEPéter BaksaKeymasterHello,
no, it can’t be done with GDL. You could show an array in the settings dialog, but that’s not intuitive for the user, not easy to match with the geometry.
Péter Baksa
Library Platform, Software Engineer
GRAPHISOFT SEPéter BaksaKeymasterHi,
could you post the code that is already working, and a sample of the structure of the text file?
Péter Baksa
Library Platform, Software Engineer
GRAPHISOFT SEPéter BaksaKeymasterWALL_ID is only available in labels, doors and windows, there has been no changes that I know of.
What is the code that worked for you in AC20 and not in AC22? What is the subtype of the object?Péter Baksa
Library Platform, Software Engineer
GRAPHISOFT SEPéter BaksaKeymasterHi Joachim,
As I remember this has been asked previously, and I couldn’t answer it completely. The solution from the developer:
“For compatibility it can read both ANSI and UTF8 files. It detects UTF8 from the BOM at the beginning of the file. Make sure you save it with encoding including BOM, otherwise it will be treated as ANSI.”I’m sure any programmer’s text editors are capable to do it, I don’t know how to set up OpenOffice to do it.
Péter Baksa
Library Platform, Software Engineer
GRAPHISOFT SEPéter BaksaKeymasterYes, “pathOfLP_XMLConverterExecuteable” is path including the executable, eg. “C:\ArchiCAD 22\LP_XMLConverter.exe”.
I don’t know about any training video on this.Péter Baksa
Library Platform, Software Engineer
GRAPHISOFT SEPéter BaksaKeymasterThanks, this looks like a bug, I will add it to the list.
There are other ways that you can use an image, no need to save it as gsm:
– add to the embedded library, it will be included in the pln/pla/teamwork file.
– put it in a folder, and add it as a library. Many plan files can access the pictures this way, all users have to have access to the folder.
– use the lp_xmlconverter tool to include an image in the libpart, just like saving as gsm. This works with transparent images (except jpg as ui_pict).Péter Baksa
Library Platform, Software Engineer
GRAPHISOFT SEPéter BaksaKeymasterHi,
This works like in other languages’ function calls, just without the parentheses.
To pass a parameter to a macro, useparameters all
, or set it explicitly:call "macro" parameters p = p, ...
. The called macro’s unset parameters will be initialized to their default values visible in the parameter list.
A macro doesn’t know about its caller’s parameters, so if it doesn’t have one, it can’t be passed further, and the lower macro’s parameter will be again initialized to its default value in the lower macro.
So all the intermediate macros have to have the parameters that you are passing to the furthest one, and they have to be set in each macro call.Péter Baksa
Library Platform, Software Engineer
GRAPHISOFT SEPéter BaksaKeymasterHi Vojtěch,
I’ve tested it in AC22 and it works for me.
Which AC version are you using?
What do you mean by “The image is saved as a gsm object”?
What is the code to show the images?
Could you attach both the png and the jpg for testing?Péter Baksa
Library Platform, Software Engineer
GRAPHISOFT SEPéter BaksaKeymasterPéter BaksaKeymasterOK, then I need to explain where to put the code fragments I wrote.
Use your 2D code as in the picture top part, and in the parameter list add a parameter dsp, hide the parameter rsp.
To the param script insert:if GLOB_MODPAR_NAME = "rsp" then dsp = rsp * 2 parameters dsp = dsp else rsp = dsp / 2 parameters rsp = rsp endif
and in 2D script replace your 4th (non-blank) line with
hotspot2 rsp, 0, 4, rsp, 2, dsp
During dragging the hotspot, the radius line will be shown, but the parameter value in the tracker will be the diameter. You can show the diameter using:
if GLOB_FEEDBACK_MODE then line2 -rsp, 0, rsp, 0
Péter Baksa
Library Platform, Software Engineer
GRAPHISOFT SEPéter BaksaKeymasterSo you want that the center of the circle moves with dragging the diameter?
Péter Baksa
Library Platform, Software Engineer
GRAPHISOFT SEPéter BaksaKeymasterHi,
editable hotspots work only with parameters, not variables.
The solution is to use a hidden parameter that is edited by the hotspot. In your example add a parameter named rsp.
Now you have to update any changes the user makes in dsp to rsp, in the parameter script:rsp = dsp / 2 parameters rsp = rsp
But when rsp is edited by the hotspots, you will need to change dsp. This can be done with the GLOB_MODPAR_NAME global variable:
if GLOB_MODPAR_NAME = "rsp" then dsp = rsp * 2 parameters dsp = dsp else rsp = dsp / 2 parameters rsp = rsp endif
If you want, you can show the value of dsp during hotspot editing:
hotspot2 rsp, 0, 4, rsp, 2, dsp
Péter Baksa
Library Platform, Software Engineer
GRAPHISOFT SE -
AuthorPosts