• This forum is the machine-generated translation of www.cad3d.it/forum1 - the Italian design community. Several terms are not translated correctly.

macro to rename parameters in a product

  • Thread starter Thread starter ILGEGIO
  • Start date Start date

ILGEGIO

Guest
Good morning to all
I would like to create a macro catia (using catiascript) able to automatically rename all parameters, with the same name, contained in a product.

for now I have written this but it stops at the first part. .
I hope you can help me. Thank you.

sub catmain()

sfiltervalue = "xxxx" 'default value
sfiltervalue = inputbox(" insert new code", "filtering value", sfiltervalue)
if (sfiltervalue < ) then)
dfiltervalue = cdbl(sfiltervalue)
end if
for each doc in catia.documents
set productdocument = catia. active document
set product = productdocument.product
set parameters = product.parameters
set strparam = parameters.item("code")
strparam.value = sfiltervalue
next
end
 
Hi.

set productdocument = catia. active document

The problem is here. by setting up productdocuments in casket. activedocument always takes the same document, ie the main product in the active finsetra. you have to make a cycle that goes into the nested structure of the product.products.. .
If it's not clear I try to throw something down as soon as I have time!
 
hi.

set productdocument = catia. active document

the problem is here. by setting up productdocuments in casket. activedocument always takes the same document, ie the main product in the active finsetra. you have to make a cycle that goes into the nested structure of the product.products.. .
if it's not clear i try to throw something down as soon as i have time!
ok thanks 1000 after i try to look for how to make a cycle.
 
Hi.

I'm looking for a solution to the problem you're discussing here...

I also have the same need and can't solve the problem.

I'm cuffing with a lot of macros, but I don't understand it and I can't handle it.



if you managed to solve, can you share the solution?
 

Forum statistics

Threads
44,997
Messages
339,767
Members
4
Latest member
ibt

Members online

No members online now.
Back
Top