Author Topic: Delete Point All Groups  (Read 1580 times)

0 Members and 1 Guest are viewing this topic.

MSTG007

  • Water Moccasin
  • Posts: 2076
  • I can't remeber what I already asked! I need help!
Delete Point All Groups
« on: September 21, 2016, 09:39:39 am »
I am just curious if there is a routine that can quickly delete all point groups in a dwg?
Autodesk Infrastructure Design Suite 2017

Jeff_M

  • King Gator
  • Posts: 3904
  • C3D user & customizer
Re: Delete Point All Groups
« Reply #1 on: September 21, 2016, 09:47:47 am »
I wrote this eons ago to delete duplicate point groups (those created when you insert one C3D dwg into another containing the same named pg's). it could be easily modified so it deletes all except the _All Points group.

Code - Auto/Visual Lisp: [Select]
  1. (defun c:deletePGdups (/ C3D C3DDOC GROUPS GROUPSTOREMOVE)
  2.   (setq C3D (strcat "HKEY_LOCAL_MACHINE\\"
  3.     (if vlax-user-product-key
  4.       (vlax-user-product-key)
  5.       (vlax-product-key)
  6.     )
  7.     )
  8. C3D (vl-registry-read C3D "Release")
  9. C3D (substr
  10.       C3D
  11.       1
  12.       (vl-string-search
  13. "."
  14. C3D
  15. (+ (vl-string-search "." C3D) 1)
  16.       )
  17.     )
  18.       (strcat "AeccXUiLand.AeccApplication." C3D)
  19.     )
  20.   )
  21.   (setq C3Ddoc (vla-get-activedocument C3D))
  22.   (setq groups (vlax-get C3Ddoc 'pointgroups));;this line was omitted
  23.      )
  24.    (progn
  25.      (vlax-for grp groups
  26. (if (wcmatch (vlax-get grp 'name) "*.#,*.##")
  27.  (setq groupstoremove (cons grp groupstoremove))
  28. )
  29.      )
  30.      (if groupstoremove
  31. (foreach grp groupstoremove
  32.  (vlax-invoke groups 'remove grp)
  33. )
  34.      )
  35.      (vlax-release-object C3D)
  36.    )
  37.  )
  38.  (princ)
  39. )
  40.  
« Last Edit: September 21, 2016, 10:37:29 am by Jeff_M »

MSTG007

  • Water Moccasin
  • Posts: 2076
  • I can't remeber what I already asked! I need help!
Re: Delete Point All Groups
« Reply #2 on: September 21, 2016, 09:52:00 am »
LOL> that is exactly what I am dealing with. Ever since I upgraded to SP3. Drawings take forever to load, unless I manually delete all the point groups. Save, then everything is back to normal performance... Thanks a HUGE lots Jeff.
Autodesk Infrastructure Design Suite 2017

MSTG007

  • Water Moccasin
  • Posts: 2076
  • I can't remeber what I already asked! I need help!
Re: Delete Point All Groups
« Reply #3 on: September 21, 2016, 10:04:12 am »
Jeff,

I am trying to figure out why I am getting this error. What version was this made for?

Code: [Select]
; error: bad argument type: VLA-object collection: nil
Autodesk Infrastructure Design Suite 2017

Jeff_M

  • King Gator
  • Posts: 3904
  • C3D user & customizer
Re: Delete Point All Groups
« Reply #4 on: September 21, 2016, 10:40:44 am »
Well, not sure how that happened but one line was missing from the code. I've updated the code above so it now works as expected.

BTW, SP3 does some magic when saving to eliminate some stuff in drawings that should not have been here. That 'stuff' was causing long load times, after saving the load times are significantly decreased. At least until someone without SP3 opens & saves, at which point that 'stuff' will come back.

MSTG007

  • Water Moccasin
  • Posts: 2076
  • I can't remeber what I already asked! I need help!
Re: Delete Point All Groups
« Reply #5 on: September 21, 2016, 10:42:22 am »
lol... Not really what I wanted to hear about someone who does not have SP3 and saving. I will try to make sure everyone here has it updated.
Autodesk Infrastructure Design Suite 2017

FriendFromArea51

  • Swamp Rat
  • Posts: 681
  • Mars sucks!
Re: Delete Point All Groups
« Reply #6 on: September 23, 2016, 07:45:06 am »
Well, not sure how that happened but one line was missing from the code. I've updated the code above so it now works as expected.

BTW, SP3 does some magic when saving to eliminate some stuff in drawings that should not have been here. That 'stuff' was causing long load times, after saving the load times are significantly decreased. At least until someone without SP3 opens & saves, at which point that 'stuff' will come back.

mind if I ask what version of C3D this refers to?

MSTG007

  • Water Moccasin
  • Posts: 2076
  • I can't remeber what I already asked! I need help!
Re: Delete Point All Groups
« Reply #7 on: September 23, 2016, 07:50:34 am »
Works with Civil3D 2016 and 2017.
Autodesk Infrastructure Design Suite 2017

Jeff_M

  • King Gator
  • Posts: 3904
  • C3D user & customizer
Re: Delete Point All Groups
« Reply #8 on: September 23, 2016, 08:52:30 am »
Well, not sure how that happened but one line was missing from the code. I've updated the code above so it now works as expected.

BTW, SP3 does some magic when saving to eliminate some stuff in drawings that should not have been here. That 'stuff' was causing long load times, after saving the load times are significantly decreased. At least until someone without SP3 opens & saves, at which point that 'stuff' will come back.

mind if I ask what version of C3D this refers to?
Affects 2013-2017. Fixes for 2014 & 2015 available, SP2 doe 2016 & SP1.1 for 2017 contain the fix.

Dent Cermak

  • Needs a day job
  • Posts: 6909
  • Clinton, Mississippi
Re: Delete Point All Groups
« Reply #9 on: December 16, 2016, 09:56:22 am »
Ask a question. Get a custom LISP file. Sometimes it works. Sometimes it doesn't.  :whistling:

Simple solution? Look in the project folder where your survey data is located. See a *****.grp file ? Erase it. ALL point groups gone-gone.

To delete individual groups use your Point Group Manager pull down.

Individual points are removed using your coordinate file editor.

I don't like a complicated life style. Computers frazzle me enough without trying to write code.

If you are looking to me for answers, you really have problems. Carlson Survey 2016 w/ Embedded AutoCad

Jeff_M

  • King Gator
  • Posts: 3904
  • C3D user & customizer
Re: Delete Point All Groups
« Reply #10 on: December 16, 2016, 11:36:05 am »
What do you mean, Dent? "Sometimes works..sometimes doesn't"
It sounds like you provided a sloution for use in Land Desktop (or even Softdesk 8). The OP was asking about Civil3D.

Dent Cermak

  • Needs a day job
  • Posts: 6909
  • Clinton, Mississippi
Re: Delete Point All Groups
« Reply #11 on: December 16, 2016, 11:34:47 pm »
Admiditly I am using Carlson, but the C3D types in the office do the same thing on a daily basis. And my Carlson is on top of C3D. What can I say?  :whistling:
If you are looking to me for answers, you really have problems. Carlson Survey 2016 w/ Embedded AutoCad

BlackBox

  • King Gator
  • Posts: 3742
Re: Delete Point All Groups
« Reply #12 on: December 17, 2016, 05:15:41 pm »
Interesting thread; I haven't heard of Carlson since the days of Eagle Point software. Haha

Why do you use Carlson on top of C3D, dent?


Cheers
"Potential has a shelf life." - Margaret Atwood

MSTG007

  • Water Moccasin
  • Posts: 2076
  • I can't remeber what I already asked! I need help!
Re: Delete Point All Groups
« Reply #13 on: December 17, 2016, 08:28:58 pm »
So far I have heard eagle point, soft desk, LDD, civil3d and are we missing any more???? What's Bentley have? Their civil package?
Autodesk Infrastructure Design Suite 2017

BlackBox

  • King Gator
  • Posts: 3742
Re: Delete Point All Groups
« Reply #14 on: December 17, 2016, 10:46:00 pm »
Haha - Geopack or InRoads?
"Potential has a shelf life." - Margaret Atwood

Dent Cermak

  • Needs a day job
  • Posts: 6909
  • Clinton, Mississippi
Re: Delete Point All Groups
« Reply #15 on: December 20, 2016, 09:23:25 pm »
Interesting thread; I haven't heard of Carlson since the days of Eagle Point software. Haha

Why do you use Carlson on top of C3D, dent?


Cheers

Carlson is alive and well and is the software of choice in my area among several smaller firms. With the new pricing structure Autodesk has come up with. several of the larger firms are looking at Carlson products.

I do not use Carlson on top of AutoCAD. Mine is a standalone package. The engineering types use it on top of Autodesk, which is a horrible waste of money in my opinion, because they say the program is easier to use, gives the same results and much more "intuitive". (I do not explain architects or engineers. Don't ask)

The company that I am with now is looking to open a Carlson Training Center to help people in the transition. The Boss thinks that a change is coming in our area and a training center will work well. When you live in the poorest state in the union, people are looking to save a buck wherever they can without sacrificing  accuracy or quality of work. So far we have had no problems in that area.

I realize that EVERYONE here is an AutoCAD fanatic and are very hesitant to change, I was too, but then we hit that economic wall that we could not ignore. It's all about the Benjamin's! So far we have lost nothing and have a product we can use that is fully compatible with our client's needs.

I just looked at this thread and saw something that I am able to do easily and automatically and the threads seemed to say this capability was not built in, so here's a lisp routine to fix that. Caught me a little off guard. Surely AutoCAD has a points pull down with this item as an option?
If you are looking to me for answers, you really have problems. Carlson Survey 2016 w/ Embedded AutoCad

Jeff_M

  • King Gator
  • Posts: 3904
  • C3D user & customizer
Re: Delete Point All Groups
« Reply #16 on: December 20, 2016, 10:23:42 pm »
Surely AutoCAD has a points pull down with this item as an option?
Nope, hence the reason for posting the lisp....nor is there an external file to just delete as you previously suggested (the Survey point groups may have this, but I don't use the Survey database).

Dent Cermak

  • Needs a day job
  • Posts: 6909
  • Clinton, Mississippi
Re: Delete Point All Groups
« Reply #17 on: December 21, 2016, 09:34:10 am »
Are you saying that there is no way built into AutoCAD to fully edit your coordinate file? Delete, edit, etc.?? Wow!! That will be a MAJOR issue especially once the drone technology goes full bore. Those are Huge files.
Can you at least do double click editing of the points on the screen? If you erase a point on the screen is the coordinate file updated in real time to reflect this change?
In Point Groups, you can delete points from a group, but that does nor delete it from the source file. As far as I know you cannot edit point attributes in point groups.
This issue is a "war stopper" for a surveyor. It appears that at some point the need for coordinate values goes away? So, you take my site survey and add your design details without worrying about coordinates, then do like Architects love to do, rotate everything to "look good' on the sheet and then hand the design to me and say, "Lay this out on the ground". The coordinate file no longer matches drawing details and they have erased my control points that I had shown in the drawing because "they got in the way".  :crazy2: :idiot2: Really.
Maybe this is why so many Surveyors have switched over "to the Dark Side". A Surveyor's world is ALL about coordinates. Autodesk wants me to pay 8 Grand for software that basically ignores coordinates?
I suppose this is one of the main reasons that our engineering types load Carlson on top of AutoCAD. They are using Carlson Civil which has full coordinate control, a hefty survey portion and a robust GIS module all built in.
If you are looking to me for answers, you really have problems. Carlson Survey 2016 w/ Embedded AutoCad

Dent Cermak

  • Needs a day job
  • Posts: 6909
  • Clinton, Mississippi
Re: Delete Point All Groups
« Reply #18 on: December 21, 2016, 09:46:10 am »
Getting back to the original question, to delete all point groups to clean up a drawing, you should be able to delete ALL groups at one time using the "Purge" command. (Or is this something else Autodesk has done away with? It HAS been awhile since I played with AutoCAD,)
If you are looking to me for answers, you really have problems. Carlson Survey 2016 w/ Embedded AutoCad