vb.net - Change name of 3D section in Product -


i've got product in catia containing several catparts. use symbol sectioning in dmu review creation create section, cut product. section called section.1.

what i'm looking code take name catpart 1 ( mypartnumber1) , change name of section "section.1" mypartnumber1.

this code far in vb.net:

sub x()  set productdocument1 = catia.activedocument  mypartnumber1 = productnumber1.product.products.item(1).name set selection1 = productdocument1.selection selection1.search("name='section.1',all") selection1.item(1).value.name = mypartnumber1  end sub 

i problem in last line.

sub catmain()

set oprod = catia.activedocument.product set thesections = oprod.gettechnologicalobject("sections") set mysection = catia.activedocument.product.gettechnologicalobject("sections")  set osection = oprod.gettechnologicalobject("sections") set selectionpart = catia.activedocument.selection  partcount = selectionpart.count     k = 1 partcount             set selectionpart = oprod.products.item(k)     mypartnumber = catia.activedocument.product.products.item(k).name      sectioncount = osection.count     msgbox sectioncount             = 1 sectioncount                  set osection = mysection.item(i)                 osection.name = mypartnumber         next     next 

end sub

problem: of sections name of first part in product

what need ist: first section gets name of first part, second sections gets name of second part ...

i've written wrong in loops.

thx


Comments

Popular posts from this blog

asynchronous - C# WinSCP .NET assembly: How to upload multiple files asynchronously -

aws api gateway - SerializationException in posting new Records via Dynamodb Proxy Service in API -

asp.net - Problems sending emails from forum -