Author Topic: MAPFILTER Codes examples  (Read 14404 times)

0 Members and 1 Guest are viewing this topic.

Offline cam-navTopic starter

  • Premier Member
  • *****
  • Posts: 4077
  • Country: us
  • Gender: Male
    • McKinstry.com
MAPFILTER Codes examples
« on: Oct 19, 2010, 21:15:15 PM »
Here are the current mapfilter codes along with some examples for future use:

#3   Item Description
#6   Item Source Filename
#8   Item Notes
#9   Item Insulation
#17   Item Order Number
#19   Item Specification
#20   Item Tag
#22   Item Material Abrv
#23   Item Gauge
#39   Item Custom Id Number (CID)
#40   Item Cut Type
#41   Item Pattern Group
#107   Item Alias
#138   Item Connector 3
#174   Item Pallet
#176   Item Insulation Material
#177   Item Insulation Gauge
#229   Item Section Name
#286   Item Pattern Number
#480   Item Bought Out Flag
#492   CAD Block
#500   Item Connector 1
#501   Item Connector 2
#5019   Item Status
#5025   Item Service Type
#5026   Item Service Name
#5028   Double Wall
#5110   Item Drawing Name
#5111   Item Zone
#5112   Item Alternate
#5113   Item Spool Name
#5148   Item Structure Fixing Type
#5154   Item Scanned Count
#5171   Item Insulation Specification

Code: [Select]
(mapfilter "#107 = ? | #39 = # | #20 = ?")
(mapfilter (strcat "#20=" LSPvar))

? text
# = integer
LSPvar = LISP variable

|     or (shift+\)
&   and
!    not
=   equals
Dave

Offline jmerch

  • Premier Member
  • *****
  • Posts: 2297
  • Country: us
  • Gender: Male
Re: MAPFILTER Codes examples
« Reply #1 on: Oct 19, 2010, 22:54:28 PM »
I bet you don't hear how awesome you are enough, do you? :)

I was asking for this a while ago and while you did direct me to how to get these, this is still a big help.  Thanks.
Intel i7-6700K @ 4 GHz - 32GB RAM - NVidia Quadro M5000 - W10x64 - MEP & FABRICATION 2014/2017 - NAVIS 2017 - REVIT 2017.1

Offline cam-navTopic starter

  • Premier Member
  • *****
  • Posts: 4077
  • Country: us
  • Gender: Male
    • McKinstry.com
Re: MAPFILTER Codes examples
« Reply #2 on: Oct 20, 2010, 02:44:15 AM »
Thanks, my ego is huge and needs to be fed. ;)
I figured nothing exists with all of them out there and in case newbies need help this might be nice to have as a sticky.
Dave

Offline jmerch

  • Premier Member
  • *****
  • Posts: 2297
  • Country: us
  • Gender: Male
Re: MAPFILTER Codes examples
« Reply #3 on: Oct 20, 2010, 03:48:20 AM »
You know what would be nice...an updated manual with a scripting section :D YAY!
Intel i7-6700K @ 4 GHz - 32GB RAM - NVidia Quadro M5000 - W10x64 - MEP & FABRICATION 2014/2017 - NAVIS 2017 - REVIT 2017.1

Offline VirtualPilot

  • Premier Member
  • *****
  • Posts: 6735
  • Country: us
  • Gender: Male
Re: MAPFILTER Codes examples
« Reply #4 on: Oct 20, 2010, 14:11:41 PM »
...and design line...
Santos Cedeno
Pre-Production Mgr - DIXIE Metal Products

Offline cam-navTopic starter

  • Premier Member
  • *****
  • Posts: 4077
  • Country: us
  • Gender: Male
    • McKinstry.com
Re: MAPFILTER Codes examples
« Reply #5 on: Oct 20, 2010, 16:01:44 PM »
Working on the scripting one. Long process. It may never be done.

Design line I don't know much about.
Dave

Offline CADtastrophe

  • Full Member
  • ***
  • Posts: 187
  • Country: us
  • Gender: Male
Re: MAPFILTER Codes examples
« Reply #6 on: Nov 01, 2010, 20:59:55 PM »
I have been trying for months to make a button that will automatically seperate all of our duct by service type, service, and CID (straights/fittings) for spooling and cut sheets, but could never get passed the mapfilter dialog window. I was able to complete today it now that I have this info. Thank you for posting this!

If anyone wants it, I can post the code here (although I'm fairly sure its not as efficient as it could be)

Offline CADtastrophe

  • Full Member
  • ***
  • Posts: 187
  • Country: us
  • Gender: Male
Re: MAPFILTER Codes examples
« Reply #7 on: Dec 21, 2010, 19:09:00 PM »
Trying to revise this further to allow one-button separation of duct plus "createcam", but I'm running into a snag.
Our shop likes us to group straights and end caps of the same service into the same MAJ, but the command doesn't seem to like using "and" and "or" in the same line.
For example, I need all supply straights and end caps to be selected, I use:

Code: [Select]
(mapfilter "#5026=*SA*'=866|#5026=*SA*'=12")
But I assume it has a problem reading the & and | symbols, because it selects ALL duct of service type *SA*. I have tried switching the different filters around, separating them with quotes and parentheses to no avail. Is there anyway this can be done through a macro?

Offline jmerch

  • Premier Member
  • *****
  • Posts: 2297
  • Country: us
  • Gender: Male
Re: MAPFILTER Codes examples
« Reply #8 on: Dec 21, 2010, 19:25:33 PM »
I use something similar but with a space between the | symbol.

Code: [Select]
(mapfilter "#5025 = #57 | #5025 = #62" sset)
Make sure your selection works in the actual MAP filter.  Mine is tricky when it comes to "and" "or".
Intel i7-6700K @ 4 GHz - 32GB RAM - NVidia Quadro M5000 - W10x64 - MEP & FABRICATION 2014/2017 - NAVIS 2017 - REVIT 2017.1

Offline CADtastrophe

  • Full Member
  • ***
  • Posts: 187
  • Country: us
  • Gender: Male
Re: MAPFILTER Codes examples
« Reply #9 on: Dec 21, 2010, 20:20:41 PM »
Can't seem to get it to work in the mapfilter window either. Can you use quotes, parentheses, or brackets to signify precedence of operators?

If not, is there a way to use mapfilter to add items to an existing selection rather than create a new select? For example, could I somehow run the mapfilter once to select all supply air straights, and then run it again to add all supply air endcaps to the selection?

Offline jmerch

  • Premier Member
  • *****
  • Posts: 2297
  • Country: us
  • Gender: Male
Re: MAPFILTER Codes examples
« Reply #10 on: Dec 21, 2010, 20:42:59 PM »
I believe there should be multiple ways of accomplishing this.

1. isolate your service, then run the filter for straights or endcaps
2. in map filter, try Item Service name (or whatever) ="*SA*" and xxx=straight or xxx=endcap
3. run the filter for the straights, save as a selection set, then run another filter for endcaps, save as selection set, then make a new selection set using both the previous as your "select objects".

But someone else on here probably knows a better method that I didn't think of :D
Intel i7-6700K @ 4 GHz - 32GB RAM - NVidia Quadro M5000 - W10x64 - MEP & FABRICATION 2014/2017 - NAVIS 2017 - REVIT 2017.1

Offline CADtastrophe

  • Full Member
  • ***
  • Posts: 187
  • Country: us
  • Gender: Male
Re: MAPFILTER Codes examples
« Reply #11 on: Dec 21, 2010, 21:02:05 PM »
Great idea! #1 does exactly what I am looking for, thanks!

Offline CADtastrophe

  • Full Member
  • ***
  • Posts: 187
  • Country: us
  • Gender: Male
Re: MAPFILTER Codes examples
« Reply #12 on: Dec 21, 2010, 21:34:21 PM »
OK, now if I wanted to take this a step further...

I know there's no way to use a macro to input the filename when it asks me what to save the MAJ as. Can this be done through a LISP?

Also, sometimes we may have a job where we do not use a service we normally use. However, if no items are found it will select the previous set, which could lead to some parts getting fabbed twice. Is there a way to set the selection to none before running each mapfilter so this doesn't happen?

Offline cam-navTopic starter

  • Premier Member
  • *****
  • Posts: 4077
  • Country: us
  • Gender: Male
    • McKinstry.com
Re: MAPFILTER Codes examples
« Reply #13 on: Dec 21, 2010, 21:35:04 PM »
I was thinking LISP but I forgot MAP doesn't expose the MAPFILTER selections to AutoCAD to make selection sets out of.

EDIT: I was in the thinking room (the one labeled "MENS" on the door) and I know I have some LISP's that pass the MAPFILTER to a selection set so it should work...... stay tuned.

You could use:

Code: [Select]
(defun c:ccfilter ()
(setq ss1(mapfilter "#5026=*SA*'=866"))
(setq ss2(mapfilter "#5026=*SA*'=12"))
(setq ss3 ss1
n (sslength ss2)
)
(while (> n 0)
(setq n (1- n)
ss3 (ssadd (ssname ss2 n) ss3)
)
)
(createcam ss3)
)

otherwise.
Dave

Offline cam-navTopic starter

  • Premier Member
  • *****
  • Posts: 4077
  • Country: us
  • Gender: Male
    • McKinstry.com
Re: MAPFILTER Codes examples
« Reply #14 on: Dec 21, 2010, 21:38:55 PM »
OK, now if I wanted to take this a step further...

I know there's no way to use a macro to input the filename when it asks me what to save the MAJ as. Can this be done through a LISP?

Also, sometimes we may have a job where we do not use a service we normally use. However, if no items are found it will select the previous set, which could lead to some parts getting fabbed twice. Is there a way to set the selection to none before running each mapfilter so this doesn't happen?

(updatejobdata "JN" jobName)

You could add a filter to select only items with a *status* of "Not Fabbed" if you use this functionality.
Dave