pycatia icon indicating copy to clipboard operation
pycatia copied to clipboard

[DISCUSSION] New product creation when "Manual Import" is checked.

Open Kanfit opened this issue 5 years ago • 6 comments

Describe the bug New product creation when "Manual import" check box checked in the infrastructure options. It's not a bug in pycatia.

To Reproduce Go to Options ->Infrastructure->Product Structure->Product structure tab and check Part Number manual input. Add new product using Add method and try to set product name thru code. Above will not work. Uncheck "Manual input" and you are good to go.

https://stackoverflow.com/questions/31998761/create-new-product-in-catia-with-python

To call VBA function in python works like a charm. Any thought?

edit: fixed broken link

Kanfit avatar Jan 18 '21 13:01 Kanfit

Hmm, maybe embedding the VBA function into pycatia would be good for this use case.

I tried looking to see if the setting can be checked / changed through the COM interface but I'm can't find it.

evereux avatar Jan 24 '21 14:01 evereux

If what I understand is right, this issue would be about setting controller. #62 could be a reference.

Unfortunately, in my environment(V5R19), Tab "Options ->Infrastructure->Product Structure->Product structure" is not exposed by CATIA. It can be tested in later environment.

Generally, I would use "Dumps parameters values"(bottom left button in options window) to record a specific option tab. If it could record an useful VBScript, then setting control would be possible.

Tian-Jionglu avatar Jan 26 '21 03:01 Tian-Jionglu

I tried this myself the other day on R21 and it isn't exposed there either.

I have contacts who use much later releases. I'll get them to check.

evereux avatar Jan 26 '21 08:01 evereux

R28 - Isn't exposed. Anyway, even if they will expose this setting in a future release that won't help me much( limitation to use specific Catia V5 version). So, VBA injection is a way to go for now.

Kanfit avatar Jan 27 '21 16:01 Kanfit

can u write simple code ? i check in some releases of catia V5R29 and maybe R30-31

ptm-tm avatar Oct 11 '23 19:10 ptm-tm

R33 - not exposed

deloarts avatar Oct 12 '23 07:10 deloarts