Laws??
Laws??
(OP)
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 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)





RE: Laws??
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
RE: Laws??
RE: Laws??
RE: Laws??
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:)
RE: Laws??
/*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