Unable to Set IGES Translation Parameters

I'm trying to set the author, company, and product parameters using the following code:

IGESControl_Writer writer;
Interface_Static::SetCVal("write.iges.header.company", "MyCompany");
Interface_Static::SetCVal("write.iges.header.product", "MyProduct");
Interface_Static::SetCVal("write.iges.header.author", "ThisIsMe");

However, I always get the default values in the output IGES file:

S0000001
,,31HOpen CASCADE IGES processor 6.2,13HFilename.iges, G0000001
16HOpen CASCADE 6.2,31HOpen CASCADE IGES processor 6.2,32,308,15,308,15,G0000002
,1.,2,2HMM,1,0.01,15H20080223.135350,0.0001,,4Hrice,,11,0, G0000003
15H20080223.135350,; G0000004
S 1G 4D 0P 0 T0000001

I've found that if I call writer.Model()->ApplyStatic() that the "author" and "company" values get set, but I cannot change the "product" header item.

Any guidance on how to modify these values?

Thanks.
Michael

suman's picture

I'm also trying to do the same....
But I'm unable to set the translation parameters....
Can You help me to set the translation parameters...

Thanks in Advance
--suman

suman's picture

Hi...
Can Anybody help me to set the translation parameters as I'm unable to set by using the above method.....

Can you please help me...

Thanks in Advance
--suman

suman's picture

Hi Roman...
Can you please help me to set the translation parameters...

Thanks for your Help
--suman

Roman Lygin's picture

Suman,

Be disciplined and patient to read the documentation. This can be more rewarding than just waiting for the answers on the forum.

Data Exchange User's Guide explains this.

//set export options (after initialization has been done)
Interface_Static::SetCVal ("write.iges.header.author", myAuthor.ToCString());
Interface_Static::SetCVal ("write.iges.header.company", myCompany.ToCString());
...

IGESCAFControl_Writer aWriter;
aWriter.Model()->ApplyStatic(); //to apply set parameters

The 'product' is not set 'as is' due to a bug in OCC IGESData_IGESModel::ApplyStatic(). You may want to fix it to process the 'product' case.

Roman
---
opencascade.blogspot.com - the Open CASCADE blog

OCCPATCH

suman's picture

Hi Roman....
Thanks for your reply and sugestions...
I'm very thankful to you for your patience....
Please don't think otherwise...I'll assure you that I will be desciplined...

Thanks
--suman

PG's picture

I tried this way, and it works for setting CVal variables.
But I not able to apply the 'mode' using the SetIVal("write.iges.writebrepmode.mode",1) i.e
change to BREP instead of the default 'Faces'.
thanks in advance
- PG

David Holliday's picture

I had the same problem: trying to output using BRep mode with a IGESCAFControl_Writer. I took a look at the source code and it appears that there is no way to set it to BRep mode. Is there something I'm missing or should I just modify the source?