简体   繁体   中英

CATIA VB.Net. edit axisSystem

I'm trying to reverse the zip direction of an axis system in CATIA, using VB.Net.

I tried the following :

Public Const catAxisSystemAxisOppositeDirection As MECMOD.CATAxisSystemAxisType = 2
`Public Const catAxisSystemAxisOppositeDirection As MECMOD.CATAxisSystemAxisType = 2

Dim axisSystems1 = selection1.Item(1).Value 
axisSystems1.Name = "Screw hole direction." & Num_hole    
axisSystems1.ZAxisDirection = catAxisSystemAxisOppositeDirection

With this it occurs an error. I tried the same in the VB6 editor inside Catia and it works. In VB.Net it doesn't.

I also tried to create a new axisSystem and I wasn't successful. I don't know what to do.

There is nothing wrong with vb.net. You are not operating on the correct property. You should be setting the value of AxisSystem.ZAxisType not AxisSystem.ZAxisDirection.

Also, if the axis system does not use a reference to define the Z-Axis direction (Z-Axis is defined using coordinates or is not set at all) trying to set this property may or may not raise an error and you will have a broken axis system on update.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM