Author Topic: MAPFILTER Codes examples  (Read 6989 times)

0 Members and 1 Guest are viewing this topic.

Offline CADtastrophe

  • Full Member
  • ***
  • Posts: 185
  • Country: us
  • Gender: Male
Re: MAPFILTER Codes examples
« Reply #15 on: Dec 21, 2010, 09:43:31 PM »
(updatejobdata "JN" jobName)

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

That would work, is there a way to update the items' status from either command line or LISP?

Nevermind, I just remembered you can set that option in the main database. Thanks!

That just leaves the question of if the MAJs can be named automatically through a LISP or not.

Offline CADtastrophe

  • Full Member
  • ***
  • Posts: 185
  • Country: us
  • Gender: Male
Re: MAPFILTER Codes examples
« Reply #16 on: Dec 21, 2010, 10:02:28 PM »
Maybe I spoke too soon; If I try add the status filter, I go back to my original problem of the command not working correctly if "and" and "or" are in the same filter.

OK, I didn't realize before that the program knows not to fab items with the status set, tres cool! BUT now I'd also like to filter out the doublewall duct for separate MAJs, and that brings me back to my original problem.

Finally figured this out while researching an unrelated project. I didn't know about the MASKVIEW command until now. Implemented it into this project and it works! Thanks everyone!

Offline edsharp

  • Full Member
  • ***
  • Posts: 167
  • Country: us
  • Gender: Male
Re: MAPFILTER Codes examples
« Reply #17 on: Oct 18, 2018, 01:59:31 PM »
Kinda new to lisping and having a great time with it ... but i cant figure out how to make the mapfilter for boughtout to work

(mapfilter "#480 =  ") not sure what goes after the =  . i want it to be yes but apparently its not that easy

any help would be appreciated

Offline edsharp

  • Full Member
  • ***
  • Posts: 167
  • Country: us
  • Gender: Male
Re: MAPFILTER Codes examples
« Reply #18 on: Oct 18, 2018, 04:09:15 PM »
Never mind

   found out where to find the info


Offline Darren Young

  • Premier Member
  • *****
  • Posts: 1521
  • Country: us
  • Gender: Male
    • Hermancon Company LLP
Re: MAPFILTER Codes examples
« Reply #19 on: Oct 18, 2018, 04:10:45 PM »
Use the Map Filter command in AutoCAD and use the dialog box to set it. Then, browse to this folder....

C:\Users\<username>\AppData\Local\Autodesk\Fabrication 2018\CADmep

Open the file MFILTER.MAP in Notepad (it's just plain text).

You'll see the syntax it requires....
#480 = #1

Use that in Lisp to do the same thing...

(mapfilter "#480 = #1")

The "1" is just a binary true/false flag. 1 = Yes or True. 0 = No or False.

Offline edsharp

  • Full Member
  • ***
  • Posts: 167
  • Country: us
  • Gender: Male
Re: MAPFILTER Codes examples
« Reply #20 on: Oct 18, 2018, 05:31:10 PM »
Darren

Thanks ..... yes or no worked i'll give it a go with #1 or #0....

In 1993 i went to college for autocad (r 12) and was well versed in lisping but wasn't much work for CAD guys then but tons of work for pipe-fitters so that's the route i took. always played in CAD and now i'm a full time Cad guy and lisp code is starting to come back to me.

 one more question what are the 3 digits behind the mapfilter 0 1 0   (mapfilter "#480 = yes " 0 1 0 ss ) I've screwed around with them and had some unpleasant  results.

thanks again

Offline cadragon

  • Senior Member
  • ****
  • Posts: 423
  • Country: us
  • Gender: Male
Re: MAPFILTER Codes examples
« Reply #21 on: Oct 18, 2018, 06:06:16 PM »
The first two correspond to the two check boxes on the bottom of the Mapfilter dialog, Isolate Selected Objects and Hide XRefs.  But I have never figured out what the third option does.

Offline edsharp

  • Full Member
  • ***
  • Posts: 167
  • Country: us
  • Gender: Male
Re: MAPFILTER Codes examples
« Reply #22 on: Mar 08, 2019, 03:41:34 PM »
the third digit prompts you to select the objects
0=selects all map objects 1=allows you to select objects

Offline mdomer

  • Active Member
  • **
  • Posts: 12
  • Country: us
  • Gender: Male
Re: MAPFILTER Codes examples
« Reply #23 on: Mar 13, 2019, 06:14:51 PM »
I made a small lisp to delete joints, with the help you all provided, which worked great until today for some reason ...

Code: [Select]
(defun C:dj ( / )
(mapfilter "#5025 = 58")
(command "erase" "ALL")
(princ "\nAll joints of *Joint* service type have been erased.")
(princ)
)

I've made no changes to service types or the lisp. Any ideas?

Offline cam-navTopic starter

  • Premier Member
  • *****
  • Posts: 4070
  • Country: us
  • Gender: Male
    • McKinstry.com
Re: MAPFILTER Codes examples
« Reply #24 on: Jul 12, 2019, 04:36:52 PM »
Try this:

Sorry, I didn't see this sooner..

Code: [Select]
(defun C:dj ( / )
(ssadd(mapfilter "#5025 = 58"))
(command "erase")
(princ "\nAll joints of *Joint* service type have been erased.")
(princ)
)
Dave
W10 64 bit- Dell M7710
Autodesk: AutoCAD MEP 2016, Fabrication 2016 CADmep
and Point Layout 2016