mir
Guest
Hi.
how can you change the data that is displayed in your browser ... besides the name I mean?
Thank you.
♪
how can you change the data that is displayed in your browser ... besides the name I mean?
Thank you.
♪
Hi.
how can you change the data that is displayed in your browser ... besides the name I mean?
Thank you.
♪
Where am I wrong?system.argumentexception: the 'length' argument must be greater or equal to zero.
in microsoft.visualbasic.strings.left(string str, int32 length)
in lmirulescript.main()
in autodesk.ilogic.exec.appdomexec.execruleinassembly(assembly assem)
in ilogic.ruleevalcontainer.execruleeval(string execrule)
----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
error in the rule: rule0, document: xxxx.iam
the 'length' argument must be greater or equal to zero.
Where am I wrong?sub main
.............
iproperties.value(name, "project", "barcode")=shortname'scrive sul numero parte il nome del file
doc.displayname = buildname(doc)
next
end sub
private function buildname(doc as document) as string
dim new_name as string
dim designtrackprops as propertyset
designtrackprops = doc.propertysets.item("design tracking properties")
new_name = designtrackprops.item("barcode").value & " - " & _
designtrackprops.item("descr_partel1").value
' new_name = designtrackprops.item("part number").value
buildname = new_name
end function
run the attached ilogic command (download it since I made changes)
can restore values using the rename command from the "productivity" menu
Good man,ho trovato questo ilogic, rinomina il browser mettendo il n° parte + descrizione
sembra funzionare
sub main
dim asmdoc as assemblydocument
asmdoc = thisapplication.activedocument
shortname=thisdoc.filename(false) 'with extension (false) without extension
' change the name for the assembly.
asmdoc.displayname = buildname(asmdoc)
' change the name in every referenced document.
dim doc as document
for each doc in asmdoc.allreferenceddocuments
oorigrefname = doc.fullfilename
fnamepos = instrrev(oorigrefname, "", -1)'find the postion of the last backslash in the path
name = right(oorigrefname, len(oorigrefname) - fnamepos)'get the file name with the file extension
shortname = left(name, len(name) - 4)'get the file name (without extension)
iproperties.value(name, "project", "part number")=shortname'scrive sul numero parte il nome del file
doc.displayname = buildname(doc)
next
end sub
private function buildname(doc as document) as string
dim new_name as string
dim designtrackprops as propertyset
designtrackprops = doc.propertysets.item("design tracking properties")
new_name = designtrackprops.item("part number").value & " - " & _
designtrackprops.item("description").value
' new_name = designtrackprops.item("part number").value
buildname = new_name
end function
hi I tried it in a set:
Where am I wrong?
Hello, and thank you for the answer.You must omit this command line by adding the apex in front of asm.... .
' change the name for the assembly.
' asmdoc.displayname = buildname(asmdoc)
Hi.
'********************'rinomina browser
'********************
public sub cambia_nodo()
dim asmdoc as assemblydocument
set asmdoc = thisapplication.activedocument
' change the name for the assembly.
asmdoc.displayname = buildname(asmdoc)
' change the name in every referenced document.
dim doc as document
for each doc in asmdoc.allreferenceddocuments
doc.displayname = buildname(doc)
next
end sub
private function buildname(doc as document) as string
dim name as string
dim designtrackprops as propertyset
set designtrackprops = doc.propertysets.item("design tracking properties")
name = designtrackprops.item("part number").value & " - " & _
designtrackprops.item("description").value
buildname = name
end function