×
INTELLIGENT WORK FORUMS
FOR ENGINEERING PROFESSIONALS

Log In

Come Join Us!

Are you an
Engineering professional?
Join Eng-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Eng-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Jobs

refresh loop on a rule that calls an action

refresh loop on a rule that calls an action

refresh loop on a rule that calls an action

(OP)
Hello

can anyone please explain to me why this rule has infinitive refresh problem?

CODE -->

Let OpenBodyFeature1 (OpenBodyFeature)
Let OpenBodyFeature2 (OpenBodyFeature)
Let OpenBodyFeature3 (OpenBodyFeature)
Let OpenBodyFeature4 (OpenBodyFeature)

set OpenBodyFeature1 = `Geometrija izvoda\NN_strana\NN_gore_unutarnji` 
set OpenBodyFeature2 = `Geometrija izvoda\NN_strana\NN_gore_vanjski` 
set OpenBodyFeature3 = `Geometrija izvoda\NN_strana\NN_dolje_unutarnji` 
set OpenBodyFeature4 = `Geometrija izvoda\NN_strana\NN_dolje_vanjski` 

if Dvije_sekcije == "DA"
{
	Relations\Rules\Izvodi\Promijeni_status_aktivacije   ->Run(OpenBodyFeature1 ,true)
	Relations\Rules\Izvodi\Promijeni_status_aktivacije  ->Run(OpenBodyFeature2 ,true)
	Relations\Rules\Izvodi\Promijeni_status_aktivacije  ->Run(OpenBodyFeature3 ,true)
	Relations\Rules\Izvodi\Promijeni_status_aktivacije  ->Run(OpenBodyFeature4 ,true)
}
else
{
	Relations\Rules\Izvodi\Promijeni_status_aktivacije   ->Run(OpenBodyFeature1 ,false)
	Relations\Rules\Izvodi\Promijeni_status_aktivacije  ->Run(OpenBodyFeature2 ,false)
	Relations\Rules\Izvodi\Promijeni_status_aktivacije  ->Run(OpenBodyFeature3 ,false)
        Relations\Rules\Izvodi\Promijeni_status_aktivacije  ->Run(OpenBodyFeature4 ,false)
} 

Relations\Rules\Izvodi\Promijeni_status_aktivacije is an action:

inputs:

CODE -->

geoSet :  OpenBodyFeature,visState :  Boolean 

CODE -->

let GF_Children (List)
let SK_Children (List)
Let GeometricFeature1 (GeometricFeature)
Let Sketch1 (Sketch)

GF_Children = geoSet ->Query("GeometricFeature","")
SK_Children = geoSet ->Query("Sketch","")

for GeometricFeature1 inside GF_Children
{
	GeometricFeature1.Activity = visState	
}

for Sketch1 inside SK_Children 
{
	Sketch1.Activity = visState	
} 


RE: refresh loop on a rule that calls an action

i have the feeling that when you change the value to YES it trigger the action as something in the file changed. also when you change the activity to yes or no you trigger another action as something changed...

you might need to create a parameter flag and set proper value to run your action only once.

maybe something like

CODE --> code

if Dvije_sekcije == "DA" and runOnceFlag 
{
	runOnceFlag = False
	Relations\Rules\Izvodi\Promijeni_status_aktivacije   ->Run(OpenBodyFeature1 ,true)
	Relations\Rules\Izvodi\Promijeni_status_aktivacije  ->Run(OpenBodyFeature2 ,true)
	Relations\Rules\Izvodi\Promijeni_status_aktivacije  ->Run(OpenBodyFeature3 ,true)
	Relations\Rules\Izvodi\Promijeni_status_aktivacije  ->Run(OpenBodyFeature4 ,true)
	runOnceFlag = True
}
else
{
	runOnceFlag = False
	Relations\Rules\Izvodi\Promijeni_status_aktivacije   ->Run(OpenBodyFeature1 ,false)
	Relations\Rules\Izvodi\Promijeni_status_aktivacije  ->Run(OpenBodyFeature2 ,false)
	Relations\Rules\Izvodi\Promijeni_status_aktivacije  ->Run(OpenBodyFeature3 ,false)
        Relations\Rules\Izvodi\Promijeni_status_aktivacije  ->Run(OpenBodyFeature4 ,false)
	runOnceFlag = True
} 

Eric N.
indocti discant et ament meminisse periti

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Eng-Tips Forums free from inappropriate posts.
The Eng-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Eng-Tips forums is a member-only feature.

Click Here to join Eng-Tips and talk with other members!


Resources