vb and catia connection
vb and catia connection
(OP)
saw on many macros when form runs it first checks for connection with catia and if connection is ok some text or button turns green or no matter what color. cat anybody share a code for VBA/VB6? how to get catia i know but can't figure out how to change button color.
thanks in advance,
cheers.
thanks in advance,
cheers.





RE: vb and catia connection
RE: vb and catia connection
if someone needs a code
feel free to play around with that
CODE --> vba/vb6
Sub UserForm_Initialize() NewDocBox.List = Array("PART", "DRAWING", "PRODUCT") SaveAsList.List = Array("PART", "DRAWING", "PRODUCT") lngGreen = RGB(102, 204, 0) lngRed = RGB(255, 0, 0) On Error Resume Next Set MyCATIA = GetObject(, "CATIA.Application") If Err.Number = 0 Then ConnectionStatus.Caption = "CONNECTED TO CATIA V5" ConnectionStatus.ForeColor = lngGreen Else ConnectionStatus.Caption = "NOT CONNECTED TO CATIA V5" ConnectionStatus.ForeColor = lngRed End If End SubRE: vb and catia connection
RE: vb and catia connection
RE: vb and catia connection
RE: vb and catia connection
we have to put some label on a plies so fabric cutting machine can write it on a ply. since Catia don't have too much options for creating label i did it thru macro.
for example in option for flatten geometries missing prefix and suffix. Dassault Systemes already got email from me.
thru a macro i can easily add what i want..
cheers...
created in vb6
Ferdo thanks a lot for a part of your code...
p.s again not running on another PC
NOT WORKING WITH CATIA V5R25 SP2..I'M RUNNING V5R25 SP3 HX3
RE: vb and catia connection
Did you checked on those computers if you have all references used by your programs? For example ocx files....
Just a suggestion...try to move on VS2010Express (for example), is free... do your applications portable and include the references in same folder like your exe file...so you will avoid problems...
One of reasons I'm still using catvbs or catscript (even if you can't do nice UI) is this one, I'm not depending so much of CATIA release...
Regards
Fernando
https://picasaweb.google.com/102257836106335725208 - Romania
https://picasaweb.google.com/103462806772634246699... - EU
RE: vb and catia connection
the reason i switched from buttons to images is just cool design..
looks nice isn't it?
i use http://buttonoptimizer.com for this
RE: vb and catia connection
everything work fine with regular properties
here's a code
CODE --> VB6
'----GET FILE REVISION---- REV.Value = Product1.Revision If Product1.Revision = "" Then REV.Value = "NOT FILLED" End If '----GET TITLE---- DESCR.Value = Product1.DescriptionRef If Product1.DescriptionRef = "" Then DESCR.Value = "NOT FILLED" End If '----END---- '----GET FILE FOR MANUFACTURING---- 'FileFormManufacturing.Value = Product1.UserRefProperties.Item("FILE FOR MANUFACTURING").ValueFromString 'If Product1.UserRefProperties.Item("FILE FOR MANUFACTURING").ValueFromString = "" Then 'FileFormManufacturing.Value = "NOT EXISTS" 'End If Status.Caption = "IDLE..." End Subi read properties at form initialize. highlighted code doesn't works for me.
any help will be appreciated.
cheers,
Jenia