Macro to remove geoset
Macro to remove geoset
(OP)
I'm trying to do a macro that will remove the selected geo set while keeping the content.
There is already a function in Catia that does this called "Remove Geographical Set" but the macro recorder does not catch it and I can't find it in HybridBody objects
Alternatively I was thinking of manually moving everything in the GS before it and then deleting it but it's a bit past my skill.
Anyone able to help me ? I'm experienced in VBA/VB.Net but totally new to Catia API so any exemple is welcome
Thanks !
There is already a function in Catia that does this called "Remove Geographical Set" but the macro recorder does not catch it and I can't find it in HybridBody objects
Alternatively I was thinking of manually moving everything in the GS before it and then deleting it but it's a bit past my skill.
Anyone able to help me ? I'm experienced in VBA/VB.Net but totally new to Catia API so any exemple is welcome
Thanks !





RE: Macro to remove geoset
In its simplest form:
CODE --> VA
To delete the geoset:
CODE --> VA
It would be worth you looking at the V5Automation.chm file to get started with CATIA macros.
RE: Macro to remove geoset
What kind of Geo Set is it? What do you have inside? Where do you want to move those elements? Are you in v5 or v6? Are you in a CATPart window or CATProduct window? Do you have vba available or not?
I'm asking all these because I recently saw something similar in v6...
Regards
Fernando
https://picasaweb.google.com/102257836106335725208 - Romania
https://picasaweb.google.com/103462806772634246699... - EU
RE: Macro to remove geoset
Thanks ! I did not know about CATIA.StartCommand. I have browsed V5Automation.chm but it is a mess (least compared to Solidworks Api Help)
@ferdo
It is a GSD geoset either in a catpart windows or in a catpart in a catproduct with Catia V5 and VBA
RE: Macro to remove geoset
The logical process should be (and is not quite all):
- select the GS
- copy everything inside
- get the name of GS
- activate the CATPart where is this GS
- create a new temporary GS
- select the new GS and paste everything from memory inside
- search and delete old GS, you already know the name
Simple, isn't it? Parts of all this process can be found in V5Automation.chm or CATIA_Portable_Script_Center.
Regards
Fernando
https://picasaweb.google.com/102257836106335725208 - Romania
https://picasaweb.google.com/103462806772634246699... - EU