Continue to Site

Welcome to MCAD Central

Join our MCAD Central community forums, the largest resource for MCAD (Mechanical Computer-Aided Design) professionals, including files, forums, jobs, articles, calendar, and more.

VB API Help with renaming a feature

Joe_

New member
Hi All,

I need a help in using VB API to rename a feature/group name.


I have a UDF Feature. I want to change the Group name.


'Code Start
Dim featGrup As IpfcFeatureGroup
....
msgbox ("Group Name : " + featGrup.GroupName)
'Code End


I am able to get the GroupName. But its a readonly property. Cant change the name using that.

I also tried to cast this to IpfcFeature. But that also seems not working.


Can anyone help, either with this prob or How to Rename an ordinary feature?

Thanks.


HTH,
Joe.
----------------------------------------------
you can find some tips at...
http://tipsfromjoe.blogspot.com
----------------------------------------------
 
Hi Guys,


I got a solution from HUGO of PTC forum. Its as follows.
<BLOCKQUOTE dir=ltr style="MARGIN-RIGHT: 0px">


Dim model As IpfcModel
model = asyncConnection.Session.CurrentModel


Dim powner As IpfcModelItemOwner
powner = model


Dim item As IpfcModelItem
item = powner.GetItemByName(EpfcModelItemType.EpfcITEM_FEATURE, featGrup.GroupName)


item.SetName("MYNAME") </BLOCKQUOTE>
HTH,
Joe.
----------------------------------------------
you can find some tips at...
http://tipsfromjoe.blogspot.com
----------------------------------------------
 

Sponsor

Articles From 3DCAD World

Back
Top