<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Update parameters programmatically. in Libraries &amp; objects</title>
    <link>https://community.graphisoft.com/t5/Libraries-objects/Update-parameters-programmatically/m-p/158070#M20424</link>
    <description>&lt;BLOCKQUOTE&gt;Beart wrote:&lt;BR /&gt;But it does not work…Can you tell me  correct code when object  rescaling(Scale independent)?&lt;/BLOCKQUOTE&gt;
I'm not sure what you're aiming to do, but all you need is something like this:&lt;PRE&gt;if (scaleValues) then !Scale with plan
	mul2 GLOB_SCALE, GLOB_SCALE
endif
rect2 0, 0, a, b
if (scaleValues) then
	del 1
endif&lt;/PRE&gt;
The above code draws a box either to the literal object width/depth, or optionally multiplies it by the current scale remains the specified size on the printed sheet.</description>
    <pubDate>Mon, 14 Jun 2010 15:43:29 GMT</pubDate>
    <dc:creator>Ralph Wessel</dc:creator>
    <dc:date>2010-06-14T15:43:29Z</dc:date>
    <item>
      <title>Update parameters programmatically.</title>
      <link>https://community.graphisoft.com/t5/Libraries-objects/Update-parameters-programmatically/m-p/158067#M20421</link>
      <description>&lt;DIV class="actalk-migrated-content"&gt;&lt;R&gt;Hi! How update parameters programmatically? Is it possible?&lt;BR /&gt;
e.g.
&lt;PRE&gt;if (scaleValues=1)  then !Scale with plan
	Text2 0,1, "Scale with plan"
	Parameters LastScale=0
	LastScale=0
endif

if (scaleValues=0)  then !Scale independent
		Text2 0,1,LastScale
			if ABS(LastScale-GLOB_SCALE)&amp;gt;0 then
				parameters LastScale=GLOB_SCALE 
				LastScale=GLOB_SCALE 
			endif
		Text2 0,2,LastScale
Endif
&lt;/PRE&gt;
Thank you!&lt;/R&gt;&lt;/DIV&gt;</description>
      <pubDate>Mon, 14 Jun 2010 06:57:20 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Libraries-objects/Update-parameters-programmatically/m-p/158067#M20421</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2010-06-14T06:57:20Z</dc:date>
    </item>
    <item>
      <title>Re: Update parameters programmatically.</title>
      <link>https://community.graphisoft.com/t5/Libraries-objects/Update-parameters-programmatically/m-p/158068#M20422</link>
      <description>&lt;BLOCKQUOTE&gt;Beart wrote:&lt;BR /&gt;Hi! How update parameters programmatically? Is it possible?&lt;/BLOCKQUOTE&gt;
Yes, that's no problem. I haven't tested your code snippet, but it looks OK. Just make sure it is part of the Parameter script. The &lt;I&gt;&lt;/I&gt;&lt;S&gt;&lt;I&gt;&lt;I&gt;&lt;/I&gt;&lt;/I&gt;&lt;/S&gt;parameters&lt;E&gt;&lt;/E&gt; command will only work in certain contexts, e.g. in response to editing.&lt;BR /&gt;
&lt;BR /&gt;
Tip: Either type GDL commands in all lower case or all upper case, but don't use both or (worse still) mixed case. The latest standard recommends all lower case. Consistency makes for good reading, which will make your life easier.</description>
      <pubDate>Mon, 14 Jun 2010 08:58:21 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Libraries-objects/Update-parameters-programmatically/m-p/158068#M20422</guid>
      <dc:creator>Ralph Wessel</dc:creator>
      <dc:date>2010-06-14T08:58:21Z</dc:date>
    </item>
    <item>
      <title>Re: Update parameters programmatically.</title>
      <link>https://community.graphisoft.com/t5/Libraries-objects/Update-parameters-programmatically/m-p/158069#M20423</link>
      <description>OK, Ralph. Thanks!&lt;BR /&gt;

&lt;BLOCKQUOTE&gt;Ralph wrote:&lt;BR /&gt;
Yes, that's no problem. I haven't tested your code snippet, but it looks OK.... &lt;/BLOCKQUOTE&gt;

But it does not work…Can you tell me  correct code when object  rescaling(Scale independent)?</description>
      <pubDate>Mon, 14 Jun 2010 14:17:28 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Libraries-objects/Update-parameters-programmatically/m-p/158069#M20423</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2010-06-14T14:17:28Z</dc:date>
    </item>
    <item>
      <title>Re: Update parameters programmatically.</title>
      <link>https://community.graphisoft.com/t5/Libraries-objects/Update-parameters-programmatically/m-p/158070#M20424</link>
      <description>&lt;BLOCKQUOTE&gt;Beart wrote:&lt;BR /&gt;But it does not work…Can you tell me  correct code when object  rescaling(Scale independent)?&lt;/BLOCKQUOTE&gt;
I'm not sure what you're aiming to do, but all you need is something like this:&lt;PRE&gt;if (scaleValues) then !Scale with plan
	mul2 GLOB_SCALE, GLOB_SCALE
endif
rect2 0, 0, a, b
if (scaleValues) then
	del 1
endif&lt;/PRE&gt;
The above code draws a box either to the literal object width/depth, or optionally multiplies it by the current scale remains the specified size on the printed sheet.</description>
      <pubDate>Mon, 14 Jun 2010 15:43:29 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Libraries-objects/Update-parameters-programmatically/m-p/158070#M20424</guid>
      <dc:creator>Ralph Wessel</dc:creator>
      <dc:date>2010-06-14T15:43:29Z</dc:date>
    </item>
    <item>
      <title>Re: Update parameters programmatically.</title>
      <link>https://community.graphisoft.com/t5/Libraries-objects/Update-parameters-programmatically/m-p/158071#M20425</link>
      <description>I need a Request, (operator, macros-maybe) for "auto-update" the parameters.</description>
      <pubDate>Tue, 15 Jun 2010 06:51:30 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Libraries-objects/Update-parameters-programmatically/m-p/158071#M20425</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2010-06-15T06:51:30Z</dc:date>
    </item>
    <item>
      <title>Re: Update parameters programmatically.</title>
      <link>https://community.graphisoft.com/t5/Libraries-objects/Update-parameters-programmatically/m-p/158072#M20426</link>
      <description>&lt;BLOCKQUOTE&gt;Beart wrote:&lt;BR /&gt;I need a Request, (operator, macros-maybe) for "auto-update" the parameters.&lt;/BLOCKQUOTE&gt;
You don't need this. ArchiCAD will automatically run the object's 2D script whenever the scale changes.</description>
      <pubDate>Tue, 15 Jun 2010 14:14:16 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Libraries-objects/Update-parameters-programmatically/m-p/158072#M20426</guid>
      <dc:creator>Ralph Wessel</dc:creator>
      <dc:date>2010-06-15T14:14:16Z</dc:date>
    </item>
    <item>
      <title>Re: Update parameters programmatically.</title>
      <link>https://community.graphisoft.com/t5/Libraries-objects/Update-parameters-programmatically/m-p/158073#M20427</link>
      <description>OK. Ralph. Look at this object &lt;B&gt;"Bow" &lt;/B&gt;and Scale it independent (Paper Size), please.
&lt;PRE&gt;!============================= 
! Parameters
A=1000
B=1000
tx=1000 (length)
ty=1000 (length)
!===============================
!Parameter Script
values "ty" range (0,]
values "B" ty,  -ty
values "A"  range (0,], range [,0)
values "tx"  range (0,]
!===================================
!2d Script
unID=1
hotspot2 0, 0, unID, A, 1+128, A:	unID=unID+1
hotspot2 1, 0, unID, A, 3+128, A: unID=unID+1
hotspot2 -A, 0, unID, A, 2, A: unID=unID+1
hotspot2 0,B
if symb_rotangle&amp;gt;89.999 and symb_rotangle&amp;lt;269.999 then
	rot2  180
	hotspot2 0, -ty, unID,  tx,  1+128   : unID=unID+1
	hotspot2 -tx+unit0, -ty, unID,  tx,  2    : unID=unID+1
	hotspot2 1, ty, unID,  tx,  3    : unID=unID+1
	hotspot2 -tx+unit0, 0, unID,  ty,  1+128   : unID=unID+1
	hotspot2 -tx+unit0, -ty, unID,  ty,  2    : unID=unID+1
	hotspot2 tx+unit0, 1, unID,  ty,  3    : unID=unID+1
	else
		hotspot2 0, ty, unID,  tx,  1+128   : unID=unID+1
		hotspot2  tx, ty, unID,  tx,  2    : unID=unID+1
		hotspot2 -1, ty, unID,  tx,  3    : unID=unID+1
		hotspot2  tx, 0, unID,  ty,  1+128   : unID=unID+1
		hotspot2   tx, ty, unID,  ty,  2    : unID=unID+1
		hotspot2  tx, -1, unID,  ty,  3    : unID=unID+1
endif
del top

line2 0,ty,tx,ty
line2 0,0,0,ty
line2 0,0,-A,0
line2 -A,0,tx,ty
&lt;/PRE&gt;</description>
      <pubDate>Tue, 15 Jun 2010 16:25:53 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Libraries-objects/Update-parameters-programmatically/m-p/158073#M20427</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2010-06-15T16:25:53Z</dc:date>
    </item>
    <item>
      <title>Re: Update parameters programmatically.</title>
      <link>https://community.graphisoft.com/t5/Libraries-objects/Update-parameters-programmatically/m-p/158074#M20428</link>
      <description>&lt;BLOCKQUOTE&gt;Beart wrote:&lt;BR /&gt;OK. Ralph. Look at this object &lt;B&gt;"Bow" &lt;/B&gt;and Scale it independent (Paper Size), please.&lt;/BLOCKQUOTE&gt;
Before going any further, can you explain what you are trying to accomplish, i.e. what should this object do and how does it interact with the user?</description>
      <pubDate>Tue, 15 Jun 2010 16:54:26 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Libraries-objects/Update-parameters-programmatically/m-p/158074#M20428</guid>
      <dc:creator>Ralph Wessel</dc:creator>
      <dc:date>2010-06-15T16:54:26Z</dc:date>
    </item>
    <item>
      <title>Re: Update parameters programmatically.</title>
      <link>https://community.graphisoft.com/t5/Libraries-objects/Update-parameters-programmatically/m-p/158075#M20429</link>
      <description>&lt;BLOCKQUOTE&gt;Ralph wrote:&lt;BR /&gt;Before going any further, can you explain what you are trying to accomplish, i.e. what should this object do and how does it interact with the user?&lt;/BLOCKQUOTE&gt;
Look at animated gif-pictures.</description>
      <pubDate>Wed, 16 Jun 2010 12:04:20 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Libraries-objects/Update-parameters-programmatically/m-p/158075#M20429</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2010-06-16T12:04:20Z</dc:date>
    </item>
    <item>
      <title>Re: Update parameters programmatically.</title>
      <link>https://community.graphisoft.com/t5/Libraries-objects/Update-parameters-programmatically/m-p/158076#M20430</link>
      <description>&lt;BLOCKQUOTE&gt;Beart wrote:&lt;BR /&gt;&lt;BLOCKQUOTE&gt;Ralph wrote:&lt;BR /&gt;Before going any further, can you explain what you are trying to accomplish, i.e. what should this object do and how does it interact with the user?&lt;/BLOCKQUOTE&gt;
Look at animated gif-pictures.&lt;/BLOCKQUOTE&gt;
OK, I think you are trying to make an object that is based on a fixed size (on the printed page), but can be stretched on screen (using the active units/scale).&lt;BR /&gt;
&lt;BR /&gt;
The key to this is realising the most important parameter is the size of the object on the printed page. When you display the object in 2D, the output size (and the position of the hotspot positions) is determined by multiplying this figure by the current scale. If the user resizes the object, you need to recalculate the size on the printed sheet by dividing the size in the model by the active scale. And - relating to your original question - this calculation should be done in the Parameter script, using the GDL &lt;I&gt;&lt;/I&gt;&lt;S&gt;&lt;I&gt;&lt;I&gt;&lt;/I&gt;&lt;/I&gt;&lt;/S&gt;parameter&lt;E&gt;&lt;/E&gt; command to ensure the change is permanent.</description>
      <pubDate>Sun, 20 Jun 2010 12:21:27 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Libraries-objects/Update-parameters-programmatically/m-p/158076#M20430</guid>
      <dc:creator>Ralph Wessel</dc:creator>
      <dc:date>2010-06-20T12:21:27Z</dc:date>
    </item>
    <item>
      <title>Re: Update parameters programmatically.</title>
      <link>https://community.graphisoft.com/t5/Libraries-objects/Update-parameters-programmatically/m-p/158077#M20431</link>
      <description>&lt;BLOCKQUOTE&gt;Beart wrote:&lt;BR /&gt;Look at animated gif-pictures.&lt;/BLOCKQUOTE&gt;

Nice looking object. We should have that graphical appearance option for elevation dimensions (with half white - half black triangle) built right into AC. &lt;BR /&gt;
Can you please share this object when you finish it? Thank you!&lt;BR /&gt;
&lt;BR /&gt;
Cheers,&lt;BR /&gt;
Adrian Tudoreanu</description>
      <pubDate>Sun, 20 Jun 2010 19:53:28 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Libraries-objects/Update-parameters-programmatically/m-p/158077#M20431</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2010-06-20T19:53:28Z</dc:date>
    </item>
    <item>
      <title>Re: Update parameters programmatically.</title>
      <link>https://community.graphisoft.com/t5/Libraries-objects/Update-parameters-programmatically/m-p/158078#M20432</link>
      <description>Hi Beart,&lt;BR /&gt;
&lt;BR /&gt;
How did you proceed with the object? Should we help you further? I got especially interested in this problem as connecting two parameters could be a great example for all GDL beginners. Handling scale is a pretty common problem, too. It would be nice to close this thread with a solution.&lt;BR /&gt;
&lt;BR /&gt;
Regs,</description>
      <pubDate>Wed, 07 Jul 2010 20:54:29 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Libraries-objects/Update-parameters-programmatically/m-p/158078#M20432</guid>
      <dc:creator>ztaskai</dc:creator>
      <dc:date>2010-07-07T20:54:29Z</dc:date>
    </item>
    <item>
      <title>Re: Update parameters programmatically.</title>
      <link>https://community.graphisoft.com/t5/Libraries-objects/Update-parameters-programmatically/m-p/158079#M20433</link>
      <description>Hi, &lt;B&gt;ztaskai&lt;/B&gt;. I would appreciate your help.&lt;BR /&gt;
&lt;BR /&gt;
Updating parameters can started:&lt;BR /&gt;
- If user use parameter of the element&lt;BR /&gt;
- If user opening window of the object's parameters &lt;BR /&gt;
&lt;BR /&gt;
Is it possible to doing otherwise way?</description>
      <pubDate>Sun, 11 Jul 2010 16:34:11 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Libraries-objects/Update-parameters-programmatically/m-p/158079#M20433</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2010-07-11T16:34:11Z</dc:date>
    </item>
    <item>
      <title>Re: Update parameters programmatically.</title>
      <link>https://community.graphisoft.com/t5/Libraries-objects/Update-parameters-programmatically/m-p/158080#M20434</link>
      <description>&lt;BLOCKQUOTE&gt;adytc wrote:&lt;BR /&gt;&lt;BLOCKQUOTE&gt;Beart wrote:&lt;BR /&gt;Look at animated gif-pictures.&lt;/BLOCKQUOTE&gt;

Nice looking object. We should have that graphical appearance option for elevation dimensions (with half white - half black triangle) built right into AC. &lt;BR /&gt;
Can you please share this object when you finish it? Thank you!&lt;BR /&gt;
&lt;BR /&gt;
Cheers,&lt;BR /&gt;
Adrian Tudoreanu&lt;/BLOCKQUOTE&gt;

&lt;BLOCKQUOTE&gt;ztaskai wrote:&lt;BR /&gt;Hi Beart,&lt;BR /&gt;
&lt;BR /&gt;
How did you proceed with the object? Should we help you further? I got especially interested in this problem as connecting two parameters could be a great example for all GDL beginners. Handling scale is a pretty common problem, too. It would be nice to close this thread with a solution.&lt;BR /&gt;
&lt;BR /&gt;
Regs,&lt;/BLOCKQUOTE&gt;

"BeArt Level"&lt;BR /&gt;
&lt;A href="http://archicad-talk.graphisoft.com/object_depository.php?browse=Depository/01%20General/Graphic%20Symbols" target="_blank"&gt;&lt;LINK_TEXT text="http://archicad-talk.graphisoft.com/obj ... %20Symbols"&gt;http://archicad-talk.graphisoft.com/object_depository.php?browse=Depository/01%20General/Graphic%20Symbols&lt;/LINK_TEXT&gt;&lt;/A&gt;</description>
      <pubDate>Sat, 17 Jul 2010 15:16:22 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Libraries-objects/Update-parameters-programmatically/m-p/158080#M20434</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2010-07-17T15:16:22Z</dc:date>
    </item>
    <item>
      <title>Re: Update parameters programmatically.</title>
      <link>https://community.graphisoft.com/t5/Libraries-objects/Update-parameters-programmatically/m-p/158081#M20435</link>
      <description>&lt;BLOCKQUOTE&gt;Beart wrote:&lt;BR /&gt;Hi, &lt;B&gt;ztaskai&lt;/B&gt;. I would appreciate your help.&lt;BR /&gt;
&lt;BR /&gt;
Updating parameters can started:&lt;BR /&gt;
- If user use parameter of the element&lt;BR /&gt;
- If user opening window of the object's parameters &lt;BR /&gt;
&lt;BR /&gt;
Is it possible to doing otherwise way?&lt;/BLOCKQUOTE&gt;

Hi Beart,&lt;BR /&gt;
&lt;BR /&gt;
Sorry, I lost this thread when my computer shut down in a blackout.&lt;BR /&gt;
&lt;BR /&gt;
Basically, yes. All possible triggers for executing the parameter script are listed in Section 4.4 of the GDL Technical Standards which is a part of the Basic Library Documentation ( &lt;A href="http://www.graphisoft.com/support/developer/documentation/LibraryDevKit/" target="_blank"&gt;&lt;LINK_TEXT text="http://www.graphisoft.com/support/devel ... aryDevKit/"&gt;http://www.graphisoft.com/support/developer/documentation/LibraryDevKit/&lt;/LINK_TEXT&gt;&lt;/A&gt; ). From AC14, there is one more addition on top of that: the parameter script of zone stamps is run at 'Update Zones' in case the base values of the zone are changed. I'll add that to the online documentation soon.&lt;BR /&gt;
&lt;BR /&gt;
Best regards,</description>
      <pubDate>Tue, 20 Jul 2010 16:45:47 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Libraries-objects/Update-parameters-programmatically/m-p/158081#M20435</guid>
      <dc:creator>ztaskai</dc:creator>
      <dc:date>2010-07-20T16:45:47Z</dc:date>
    </item>
    <item>
      <title>Re: Update parameters programmatically.</title>
      <link>https://community.graphisoft.com/t5/Libraries-objects/Update-parameters-programmatically/m-p/158082#M20436</link>
      <description>Hello Zsolt,&lt;BR /&gt;

&lt;BLOCKQUOTE&gt;ztaskai wrote:&lt;BR /&gt;the parameter script of zone stamps is run at 'Update Zones'&lt;/BLOCKQUOTE&gt;

Thanks for this.&lt;BR /&gt;
&lt;BR /&gt;
Just want to verify that the master script is not run at zone update?&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
Regards, Juha</description>
      <pubDate>Tue, 20 Jul 2010 22:02:22 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Libraries-objects/Update-parameters-programmatically/m-p/158082#M20436</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2010-07-20T22:02:22Z</dc:date>
    </item>
    <item>
      <title>Re: Update parameters programmatically.</title>
      <link>https://community.graphisoft.com/t5/Libraries-objects/Update-parameters-programmatically/m-p/158083#M20437</link>
      <description>Hi Juha,&lt;BR /&gt;

&lt;BLOCKQUOTE&gt;Juha wrote:&lt;BR /&gt;Just want to verify that the master script is not run at zone update?&lt;/BLOCKQUOTE&gt;

This should be answered in general. Master script is never run on its own and no script is run without it. You can imagine it as if the master script was copied at the beginning of each script. As a consequence, - in the context of parameter scripts! - the master script will be run exactly as many times as the parameter script itself; which number is determined by the changes caused by the parameter script.&lt;BR /&gt;
&lt;BR /&gt;
Cheers,</description>
      <pubDate>Wed, 21 Jul 2010 07:41:57 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Libraries-objects/Update-parameters-programmatically/m-p/158083#M20437</guid>
      <dc:creator>ztaskai</dc:creator>
      <dc:date>2010-07-21T07:41:57Z</dc:date>
    </item>
  </channel>
</rss>

