Author Topic: Create a selection set of objects based on a text string  (Read 4028 times)

0 Members and 1 Guest are viewing this topic.

Dave M

  • Newt
  • Posts: 196
Create a selection set of objects based on a text string
« on: February 11, 2016, 02:55:13 PM »
I am wondering if someone has a routine to help me out.


I have a file that was created with GIS, and I am mapping the objects to a CAD standard.  There is a lot of information in it.  All of the objects are either lines, polylines, point objects, or text.  The insertion point of the text objects share a coincidental coordinate point with the insertion point of the point objects, or the mid-point of the line, or polyline segment.


What I would like to be able to do is enter a string such as "Fitting_Service", and have AutoCAD find and select every object that is touching the matching text string.  I have attached an image to help illustrate what I am asking for.


I think this is probably possible, but I do not know how to write code.


Any help would be appreciated!
Civil 3D 2018 - Microstation SS4 - Windows 10 - Dropbox

mjfarrell

  • Seagull
  • Posts: 14444
  • Every Student their own Lesson
Re: Create a selection set of objects based on a text string
« Reply #1 on: February 11, 2016, 03:03:16 PM »
since it is GIS aka MAP based data

I would A) like to see a sample file if possible

B) suggest that you use MAP to work with it.
Be your Best


Michael Farrell
http://primeservicesglobal.com/

mjfarrell

  • Seagull
  • Posts: 14444
  • Every Student their own Lesson
Re: Create a selection set of objects based on a text string
« Reply #2 on: February 11, 2016, 03:04:48 PM »



  The insertion point of the text objects share a coincidental coordinate point with the insertion point of the point objects, or the mid-point of the line, or polyline segment.



Those are the default label points for GIS data
Be your Best


Michael Farrell
http://primeservicesglobal.com/

Dave M

  • Newt
  • Posts: 196
Re: Create a selection set of objects based on a text string
« Reply #3 on: February 11, 2016, 03:20:09 PM »
I am using Civil 3D, but I don't really know how to use the Map functionality very well.  I have attached a sample.
Civil 3D 2018 - Microstation SS4 - Windows 10 - Dropbox

mjfarrell

  • Seagull
  • Posts: 14444
  • Every Student their own Lesson
Re: Create a selection set of objects based on a text string
« Reply #4 on: February 11, 2016, 03:28:26 PM »
I am using Civil 3D, but I don't really know how to use the Map functionality very well.  I have attached a sample.

yeah, that is just dumb cad linework and text - not really much use to you in that format.


you really want the SHP file from which it originated.


let me poke at this and see if it wiggles #OOCT
Be your Best


Michael Farrell
http://primeservicesglobal.com/

mjfarrell

  • Seagull
  • Posts: 14444
  • Every Student their own Lesson
Re: Create a selection set of objects based on a text string
« Reply #5 on: February 11, 2016, 03:35:08 PM »
ideally one would have the shp file(s)

and then import them and be sure to toggle the button to create object data


then one could close that file


attach to it with map

run a query

with alter properties enabled

therein - select a range table to place these objects on the correct layer using data within the object data table to control what layer it went on to
and or color/linetype if not by layer
as well as place any lables again utilizing the data in the object data table
Be your Best


Michael Farrell
http://primeservicesglobal.com/

mjfarrell

  • Seagull
  • Posts: 14444
  • Every Student their own Lesson
Re: Create a selection set of objects based on a text string
« Reply #6 on: February 11, 2016, 03:35:50 PM »
do you have or can you get the shp file(s)?
Be your Best


Michael Farrell
http://primeservicesglobal.com/

Dave M

  • Newt
  • Posts: 196
Re: Create a selection set of objects based on a text string
« Reply #7 on: February 11, 2016, 03:45:11 PM »
I don't have access to them, and I have already converted quite a bit, so starting would not be an option.
Civil 3D 2018 - Microstation SS4 - Windows 10 - Dropbox

mjfarrell

  • Seagull
  • Posts: 14444
  • Every Student their own Lesson
Re: Create a selection set of objects based on a text string
« Reply #8 on: February 11, 2016, 03:49:13 PM »
I don't have access to them, and I have already converted quite a bit, so starting would not be an option.
is the stuff you sent me already modified?


if yes

I would need a sample of original data
Be your Best


Michael Farrell
http://primeservicesglobal.com/

mjfarrell

  • Seagull
  • Posts: 14444
  • Every Student their own Lesson
Re: Create a selection set of objects based on a text string
« Reply #9 on: February 11, 2016, 03:59:20 PM »
I don't have access to them, and I have already converted quite a bit, so starting would not be an option.
that is a shame, as with those shp files you would be done in about 10 minutes or less. With ALL of the data.

I might be worth the effort to get them.
Be your Best


Michael Farrell
http://primeservicesglobal.com/

ronjonp

  • Needs a day job
  • Posts: 7531
Re: Create a selection set of objects based on a text string
« Reply #10 on: February 11, 2016, 04:33:52 PM »
You can create a selection set of matching text items using the FIND command like so. It will not grab overlappers .. but at least you can visually inspect the items.


Windows 11 x64 - AutoCAD /C3D 2023

Custom Build PC

Dave M

  • Newt
  • Posts: 196
Re: Create a selection set of objects based on a text string
« Reply #11 on: February 11, 2016, 04:53:06 PM »
Thanks Ronjonp, but I am trying to select the objects that share the text's position
Civil 3D 2018 - Microstation SS4 - Windows 10 - Dropbox

mjfarrell

  • Seagull
  • Posts: 14444
  • Every Student their own Lesson
Re: Create a selection set of objects based on a text string
« Reply #12 on: February 11, 2016, 05:08:16 PM »
you can do that with a map query

attach your file as source


set query to location=all

object type = acad point

if you want them on a special layer set Alter Properties to change their layer/color

execute the query in Draw mode to verify

then perform a 'save back to source'

they will then be updated in the source file.

then you can do the same thing with the lines, and polylines. 


However, I will state again IF, IF you can get the original shape file you could clean all this data up in minutes.  So it might be worth asking for it.
Be your Best


Michael Farrell
http://primeservicesglobal.com/

cmwade77

  • Swamp Rat
  • Posts: 1448
Re: Create a selection set of objects based on a text string
« Reply #13 on: February 11, 2016, 05:32:35 PM »
You can use the FIND command or Quick Select command to accomplish this.

mjfarrell

  • Seagull
  • Posts: 14444
  • Every Student their own Lesson
Re: Create a selection set of objects based on a text string
« Reply #14 on: February 11, 2016, 05:35:17 PM »
You can use the FIND command or Quick Select command to accomplish this.
I promise map is faster and can  be much more discreet, or broad in it's selection through query depending on what outcome one is after.

Furth IF this were sanitary or storm drain data civil 3d would model those systems directly from the shp file.
Be your Best


Michael Farrell
http://primeservicesglobal.com/