Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations MintJulep on being selected by the Eng-Tips community for having the most helpful posts in the forums last week. Way to Go!

Laws??

Status
Not open for further replies.

wallybanger

Mechanical
Joined
Feb 19, 2009
Messages
45
Location
MX
I have been having nothing but problems with the FOG laws. No matter what I do, I can't get the laws to work.

what I really want to do is to be able to use a Parameter, driven by a spreadsheet, to hide/show parts in the model. So far I have had no luck.

For starters, Catia doesn't seem to want to let me use existing parameters in the law (It throws an error) and it also doesn't like the .Show = True attribute.

Can anyone shed some light on this issue?

(Oh, and I have all of the required knowledgeware licenses)
 
What I would really like is a String Parameter with a Y or N and something like

If String.1 == Y
{Part.1 .Show = true}
else
{Part.1 .Show = false}

It would also be nice to be able to hide/show lines, points, exc with the same parameter.

Thanks
 
I keep getting "Invalid attribute: Show used"
 
I've also been trying to do this with Rules and reactions with no luck. I'm getting REALLY frusterated.
 
I'm little confused with your initial fog law statement, what are you trying to do with it?

Regaring hiding/showing parts I remember a long time ago doing something in that area and that I needed to use VB, think I used vispropertyset.setshow. About the .show that you try to use I believe that it doesn't apply on instance/part level, only on body level and that it was the reason I used VB.

I tried to find some example code but no luck so far, If I remeber right I had a setup with a rule and a macro with argument.

Hopefully someone else has something more concrete to add:)
 
You can build this in the KWA workbench using a rule

/*Rule created by dbezaire 10/04/2012*/


if String.1 == "Yes"
{
PartBody .Show = true
`Geometrical Set.1`.Show = true
}
else
{
PartBody .Show = false
`Geometrical Set.1`.Show = false
}

or same code in a reaction based on value change of String.1


In the reaction you can get a bit more savvy and populate lists (this is true to rules but will sacrifice speed)

let lpoints (list)
let p (point)
let lcurve (list)
let c (curve)

lpoints = Part82 ->Query("Point","")
lcurve = Part82 ->Query("Curve","")


if String.1 == "Yes"
{
PartBody .Show = true
`Geometrical Set.1`.Show = true
for p inside lpoints
{
p .Show = true
}
for c inside lcurve
{
c .Show = true
}

}
else
{
PartBody .Show = false
`Geometrical Set.1`.Show = false
for p inside lpoints
{
p .Show = false
}
for c inside lcurve
{
c .Show = false
}
}

Regards,
Derek



Win XP64
R20/21, 3DVIA Composer 2012, ST R20
Dell T7400 16GB Ram
Quadro FX 4800 - 1.5GB
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top