Jump to content

Attributes be added to factor the outcome of Incremental numbers


Recommended Posts

Posted

RE: PNO lisp: Can additional attributes be added to factor the outcome of Incremental numbers?  When I review the  PNO lisp I keep wondering, can the results of assigned incremental number in "Port_Number" attribute be secondarily ordered by a 2nd attribute "Sort_Order2" value after the 1st "Sort-Order" value?  AND possibly by 3rd priority sort of 3rd attribute's alphabetic  value in a 3rd attribute "Sort_Order3"?   These option, if possible, would allow more control of the assigned incremental numbers.  Attached is blocks as example.

PNO TEST-LSP FOR NUMBING2.dwg

Posted (edited)

To Admin this is really a new task, as its the posters first post. Does not match this post.

 

You can sort multiple attributes in a order of attributes. I have some thing that works for up to 5 attributes deep. It pads missing attrbute values, so can have say 1 or up to 4 attribute values. I need some time to have a look at say add a "002" block and find highest attribute value of existing blocks.

 

("DATAPORT NUMBER" "001" "1000" "001" "") 
("DATAPORT NUMBER" "002" "1200" "002" "") 
("DATAPORT NUMBER" "002" "1200" "002" "Tomorrow") 
("DATAPORT NUMBER" "002" "1200" "002" "Yesterday")
("DATAPORT NUMBER" "003" "1200" "001" "") 
("DATAPORT NUMBER" "004" "1350" "" "")
("DATAPORT NUMBER" "005" "1400" "" "") 
("DATAPORT NUMBER" "006" "1500" "" "") 
("DATAPORT NUMBER" "007" "1600" "" "")
("DATAPORT NUMBER" "008" "1700" "" "") 
("DATAPORT NUMBER" "009" "1800.9" "" "")
("DATAPORT NUMBER" "010" "1900" "" ""))

 

 

Edited by BIGAL
Posted

Thanks Bigal for looking into this. 

The goal is to have incremental number input into Attribute "Port_Number" based on level of priority..Sort_Order then Sort_Order2 then Sort_order3.  The first and second attributes would always have a value, but the third attribute may at time be empty. Ideally when many blocks that share the same values in the 1st 2 attributes, the lisp looks to the 3rd for direction for the next incremental number assignment. 

Posted

Yes.. the layout you show is what I was thinking of.   Attached here is the PNO lisp from earlier in this thread that  I was hoping could be altered to do that.  Thanks

pno.LSP

Posted

I got to thinking.. if blocks represent parts and multiple similar Parts exists the same assigned number should be same for similar parts. So after adding  Part_Number attribute could the lisp runs the  below results?  (graphically like column order in a table, but the way the order lisp sorts).  I see issues if Part_Number and other Sort Orders values don't match when hoping for blocks with same part number to be assigned same Dataport Number.  So there would need to be a warning if that occurs. Hope this makes sense.

 

DATAPORT_NUMBER -->  order by--> | Sort_Order | Sort_Order2 | Sort_Order3 | <--Part_Number

"001" --> "1000" "001"   "" <--  "DD3" 

"002" -->"1100" "003"    "" <-- "PIE"

"002" -->"1100" "003"    "" <-- "PIE"

"003" -->"1200" "1"    "" <-- "APPLE"

"004" -->"1200" "001" "Tomorrow" <--"PEAR"

"005" --> "1200" "001" "Tomorrow"<--"PEACH"

"005" -->"1200" "001" "Tomorrow" <--"PEACH"

"006" -->"1200" "001" "Yesterday" <--"CHERRY"

"007" -->"1250" "" "" <--Box

"007" -->"1250" "" "" <--Box

"008"-->"1350" "" "" <- Chocolates

"009" -->"1400" "" "" <--Pickles

etc

PNO TEST-LSP FOR NUMBING3.dwg

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...