How to change sketch support in CATIA using vba? -


i want change sketch support 1 plane in macro. tried startcommand did not work. how can done without user input?

i have tried following code did not work.

 catia.startcommand "change sketch support"  selection1.add sketch3  sendkeys "{enter}", true  selection1.add plane_a  sendkeys "{enter}", true  part1.update 

you trying winapi , not easiest way. have 2 alternatives:

or use copy , paste method

dim osel selection = catia.activedocument.selection osel.clear() osel.add(sketch3) osel.copy() osel.clear() osel.add(plane_a) osel.paste() dim rsltsketch sketch = osel.item2(1).value osel.clear() 'you can delete first 1 if want osel.add(sketch3) osel.delete() 

or define precise vectors

dim arrayofvariantofdouble(8) arrayofvariantofdouble(0) = originpointx arrayofvariantofdouble(1) = originpointy arrayofvariantofdouble(2) = originpointz arrayofvariantofdouble(3) = directionhorizontalx arrayofvariantofdouble(4) = directionhorizontaly arrayofvariantofdouble(5) = directionhorizontalz arrayofvariantofdouble(6) = directionverticalx arrayofvariantofdouble(7) = directionverticaly arrayofvariantofdouble(8) = directionverticalz sketch3.setabsoluteaxisdata(arrayofvariantofdouble) 

Comments

Popular posts from this blog

html - Firefox flex bug applied to buttons? -

html - Missing border-right in select on Firefox -

python - build a suggestions list using fuzzywuzzy -