Create point groups on import? and COGO points to blocks on separate layers

Create point groups on import? and COGO points to blocks on separate layers

MP07
Contributor Contributor
2,378 Views
6 Replies
Message 1 of 7

Create point groups on import? and COGO points to blocks on separate layers

MP07
Contributor
Contributor

Hello,

 

What I want is actually very simple but I'm trying to find a way to make it as simple as possible and so far I haven't solved this.

So I have a bigger number of points that I want to import (let's say 2000 points) and they all should be divided to  around 40 point groups.

I defined a user point style like this

point number - easting - northing - elevation - raw description

 

I found out how to put certain points into points groups based on their raw description on the video below

https://knowledge.autodesk.com/support/civil-3d/getting-started/caas/screencast/Main/Details/fb33b1f...

but since I gotta have 40 points groups it means I have to do that at least 40 times! Also, I need to create a separate layer for each point group and again I need to do that 40 times.

So that's 80 repetitive actions!

I was wondering if I'm missing an option maybe on import where civil could create a point group based on raw description, and also a layer named exactly as raw description and putting that point group on that layer.

 

Furthermore, later I also need those COGO points to be exploded/converted as blocks

(Home ribbon> Create Ground Data Pane> Points > Create blocks from COGO points) <- this is awesome but all the blocks/blocks reference go to the same layer.

If I would want them on separate layer again I would have to repeat this action at least 40 times selecting one point group and then converting it to autocad block...

 

I mean where does Civil accelerate this workflow?

0 Likes
Accepted solutions (1)
2,379 Views
6 Replies
Replies (6)
Message 2 of 7

Jeew-m
Mentor
Mentor

Dear Friend,

As far as i know there is no automated method to make them in to groups at once.

But there is one workaround. It will not be much effective if you are using this work only once. If you use this more often that would be much useful and time saving.

 

Create description keys for each of your point codes that you need a group. In creation of description keys you can assign a layer also. You can save the drawing with description keys as a template for future needs.

 

Then import the points. it will show the points in assigned options in the description keys such as markers, labels, layer etc., but still no groups.

You can start the normal way of create point group and from the 'Raw Description Matching' tab you can assign the description keys to create point group.

 

https://www.youtube.com/watch?v=Von8oCwYcTk

 

It is time consuming for the first task but for same task in future it will be much more convenient. 

 

Thanks



Jeewana Meegahage
Design Engineer
Autodesk Civil 3D Tutorials
Facebook | YouTube | LinkedIn







Message 3 of 7

MP07
Contributor
Contributor

Thx mate,

 

I'll take a look into it, I do use it often(or almost often) but every time it will be different layer names so I guess one template to rule them all is not going to work if that is was you mean.

 

Regards,

0 Likes
Message 4 of 7

tcorey
Mentor
Mentor

It is not difficult to use LISP to move those points to a layer that matches the description or the Point Group name, but creating a point group and setting its properties doesn't look to be available in LISP. I think you'll need .NET for that.

 

 



Tim Corey
MicroCAD Training and Consulting, Inc.
Redding, CA
Autodesk Platinum Reseller

New knowledge is the most valuable commodity on earth. -- Kurt Vonnegut
Message 5 of 7

MP07
Contributor
Contributor
Accepted solution

Tim,

 

a LISP indeed came in handy at the end. I'm not sure if I can post links here so I won't, but it's called POINTSIN.

It's great, I adjusted the code and the dwg template it uses to suit my needs.

 

Thanks everyone, I hope they will introduce some new features in future versions of Civil that will solve the problematic we talked about here.

 

Regards,

Mauro

Message 6 of 7

Jeff_M
Consultant
Consultant

@tcorey, lisp can be used to create pointgroups and set the query properties. Here's an example of doing this, creating the group with a name and setting the IncludeRawDescriptions query to be the group name with the * wildcard.

 

;;Function to get or add a PointGroup
(defun CreatePG (grpname / C3D C3Ddoc ptgroup grps query)
  (vl-load-com)
  (if (and (setq C3D (strcat "HKEY_LOCAL_MACHINE\\"
			     (if vlax-user-product-key
			       (vlax-user-product-key)
			       (vlax-product-key)
			     )
		     )
		 C3D (vl-registry-read C3D "Release")
		 C3D (substr
		       C3D
		       1
		       (vl-string-search
			 "."
			 C3D
			 (+ (vl-string-search "." C3D) 1)
		       )
		     )
		 C3D (vla-getinterfaceobject
		       (vlax-get-acad-object)
		       (strcat "AeccXUiLand.AeccApplication." C3D)
		     )
	   )
	   (setq C3Ddoc (vla-get-activedocument C3D))
	   (setq grps (vlax-get C3Ddoc 'pointgroups))
      )
    (progn
      (vlax-for pg grps
	(if (eq (vlax-get pg 'name) grpname)
	  (setq ptgroup pg)
	  )
	)
      (if (not ptgroup)	
	(setq ptgroup (vlax-invoke-method grps 'Add grpname))
	)      
      (setq query (vlax-get ptgroup 'querybuilder))
      (vlax-invoke query 'clear)
      (vlax-put query 'includerawdescriptions (strcat grpname "*"))
      )
    (vlax-release-object c3d)
    )
  (princ)
  )

;;once the above is loaded, call the function with the desired PointGroup name
(createPG "EOP")
Jeff_M, also a frequent Swamper
EESignature
Message 7 of 7

tcorey
Mentor
Mentor

Thanks, Jeff!



Tim Corey
MicroCAD Training and Consulting, Inc.
Redding, CA
Autodesk Platinum Reseller

New knowledge is the most valuable commodity on earth. -- Kurt Vonnegut
0 Likes