Hi, I have a list of around 1500 COGO points, all of which have an entry in the NAME field. I would like to bulk copy this information into the DESCRIPTION and RAW DESCRIPTION field. Is this possible?
THanks
Lee
|
Hi, I have a list of around 1500 COGO points, all of which have an entry in the NAME field. I would like to bulk copy this information into the DESCRIPTION and RAW DESCRIPTION field. Is this possible?
THanks
Lee
You have a list, where? In an ASCII file? Or where?
R.K. McSwain | CAD Panacea |
I am going to assume you are referring to a list in a drawing and you want the name field moved over to raw description (which will transfer it to full description by default)?
Here's how I did this.
-Open Toolspace
-Right Click on Point Group that has your point list and export it to a CSV file with the format you want (We use PNEZD)
-Now right click on that same point group and edit points
-Highlight all the points, right click, and copy to clipboard (NOT copy value to clipboard)
-You can paste this into an excel file and excel is smart enough to break separate them into their own columns, one of which will be for names. You're now able to open up the CSV we exported previously and paste over the description field with the name column we just created.
After you copy the names and paste over the description you'll need to save the CSV and then import it back into CAD. You'll want to delete out the old points before doing this.
This will modify selected COGO in a fraction of the time.
Disclaimers: Always mind the warning when modifying survey data en-mass, UNDO is supported.
Code:(vl-load-com) (defun c:CogoNameToDesc (/ *error* acDoc ss i n) (defun *error* (msg) (if ss (vla-delete ss)) (if acDoc (vla-endundomark acDoc) ) (cond ((not msg)) ; Normal exit ((member msg '("Function cancelled" "quit / exit abort"))) ; <esc> or (quit) ((princ (strcat "\n** Error: " msg " ** "))) ; Fatal error, display it ) (princ) ) ;; User warning (alert (strcat "\nThis routine will overwrite COGO Point Raw Descriptions! " "\n" "\nBe sure to validate the resultant data, or use UNDO as needed. " ) ) (if (ssget "_:L" '((0 . "AECC_COGO_POINT"))) (progn (vla-startundomark (setq acDoc (vla-get-activedocument (vlax-get-acad-object))) ) (setq i (vla-get-count (setq ss (vla-get-activeselectionset acDoc)) ) ) (setq n 0) (vlax-for x ss (if (not (vl-catch-all-error-p (vl-catch-all-apply 'vlax-put (list x 'rawdescription (vlax-get x 'name)) ) ) ) (setq n (1+ n)) ) ) (prompt (strcat "\n" (itoa n) " of " (itoa i) " COGO Point" (if (= 1 i) " was " "s were " ) "modified " ) ) ) ) (*error* nil) )
Cheers
"How we think determines what we do, and what we do determines what we get."
Sincpac C3D ~ Autodesk Exchange Apps
Computer Specs:
Dell Precision 3660, Core i9-12900K 5.2GHz, 64GB DDR5 RAM, PCIe 4.0 M.2 SSD (RAID 0), 16GB NVIDIA RTX A4000
This code did exactly what I needed. Thank you so much!!
"How we think determines what we do, and what we do determines what we get."
Sincpac C3D ~ Autodesk Exchange Apps
Computer Specs:
Dell Precision 3660, Core i9-12900K 5.2GHz, 64GB DDR5 RAM, PCIe 4.0 M.2 SSD (RAID 0), 16GB NVIDIA RTX A4000