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

rule to put in alphabetical order drawings of parts or assemblies

  • Thread starter Thread starter Spini
  • Start date Start date

Spini

Guest
are spins reno use little inventor but when I have carpentry structures it is very practical.
my request if someone has already formulated an ilogic rule to put in alphabetical order all drawings elaborate type x.ipt and x.iam?
Thank you in advance.
renown
 
if you are talking about a multi-sheet drawing:
sub main if typeof thisdoc.document is drawingdocument then dim dwgdoc as drawingdocument = thisdoc.document for each dwgsheet as sheet in dwgdoc.sheets if dwgsheet.drawingviews.count > 0 then modelfile = dwgsheet.drawingviews(1).referenceddocumentdescriptor.fulldocumentname modeldoc = dwgsheet.drawingviews(1).referenceddocumentdescriptor.referenceddocument prtnumber = modeldoc.propertysets("{32853f0f-3444-11d1-9e93-0060b03c1ca6}").itembypropid(5).value if not string.isnullorempty(prtnumber) then dwgsheet.name = prtnumber end if end if next end if on error resume next dim drawingdoc as drawingdocument = thisdoc.document dim sheet as sheet = nothing dim sheetslist as new list(of sheet) dim browserpane as browserpane = drawingdoc.browserpanes.item("model") for each sheet in drawingdoc.sheets sheetslist.add(sheet) next sheetslist.sort(addressof comparer) for each sheet in sheetslist dim sheetnode as browsernode = browserpane.getbrowsernodefromobject(sheet) dim bottomnode as browsernode = browserpane.topnode.browsernodes.item(browserpane.topnode.browsernodes.count) browserpane.reorder(bottomnode, false, sheetnode) next end sub private function comparer(x as sheet, y as sheet) as integer return string.compare(x.name,y.name) end function
 
thanks for the interest and collaboration; I entered as a rule but it does not work. I'm sure I explained badly. I wanted to attach a picture, but I can't. Anyway when I put on paper (.idw) the various pieces that are then .ipt or .iam I find to have maybe more than 100 sheets that with a rule take the name of the drawn piece, but I wanted that with other rule they put them in alphabetical row with the name. I try to make example:csi blame machining parts.idw-ps180:1
-ps120:2
-cs2:3
_
-bd1:5
are 5 sheets in order of insertion, I wanted with rule to put them in alphabetical order, because when they are more than a hundred if I have to fix and look for one I do first, that is:csi blame machining parts.idw_
-cs1:2
-cs2:3
-ps120:4
-ps180:5
Here I would like to find it so after running the rule, if this were possible.
Thank you.
rino spins
 
thanks for the interest and collaboration; I entered as a rule but it does not work.
I tried it and it works
It's a combination of two ilogics.
the first part renames the sheets with the partnumber of the ipt or iam containing.
the second puts in alphabetical order.
I attach the two rules in txt.
 

Attachments

It doesn't work, I'm definitely wrong with something. interesting if with a single rule, I renounce leaves and I align them.
I attach files as an example.
Thank you.
renown
 

Attachments

It doesn't work, I'm definitely wrong with something. interesting if with a single rule, I renounce leaves and I align them.
I attach files as an example.
Thank you.
renown
So, I tried with your files. the first part (rename) doesn't work me but because you don't have all the files (ipt). the second part works as it should. see video. normal if the names of files or sheets are not consistent (some have space, someone not) do not reorder them as you should...

 
but I thought it worked, but where I had it, they were probably already in order. I saw the video and it works with you. can depend on the version of inventor? I'm still at 18.
Good day
renown
 

Forum statistics

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

Members online

No members online now.
Back
Top