View Full Version : 2017 Map3D command/lisp to TCOUNT object data
jason.cyr13
2017-08-01, 03:13 PM
Good morning!
I have started to delve into the Map3D functions of Civil3D, as I have to prepare a shape file for our client. This is something that is new to my department, and I want to make it as easy as possible. I have figured out how to create all my polygons and attach a table for the object data format to the polygon.
What I'm wondering is there a command that functions like TCOUNT that I can select the object data tag that I want to update, select the starting value and the increment value. The object data I've attached to my polygons is LOT, BLOCK and PLAN. The LOT value is what I'm looking to automate. Maybe there's another way that I've overlooked that I can use to complete this task as well.
Thanks for your help!
Jason
Jmurphy
2017-08-01, 10:52 PM
I don't know of any lisp out there that can do that with Object Data off hand but If you know lisp and the Map3D objects you may be able to create one for your need. The way Autodesk wants you to do it is with FDO and industry models.
jason.cyr13
2017-08-02, 01:17 PM
Thanks for your reply. I didn't think there was something ready made, and I only know enough LISP to be dangerous. I will keep exploring!
BlackBox
2017-08-02, 03:00 PM
I wrote some LISP to populate this sort of information on Civil 3D Parcel UDPs (User Defined Properties), that I could port to work with OD (ObjectData) Tables instead.
Any chance you can post a sample drawing that shows the desired end result?
Cheers
jason.cyr13
2017-08-02, 03:33 PM
BlackBox,
Here is a sample drawing. I have added the MAPANNTEMPLATE to make reviewing the info easier.
EDIT: I have a template set up, so the tag names will be consistent for each new drawing that we have to create.
Thanks for your help!
BlackBox
2017-08-07, 07:17 PM
It's been crazy here (I'll spare you the details), but I didn't want you to think I'd forgotten.
It actually took me a bit to realize that I needed to track down the AutoCAD Map 3D 2012 API Reference, for ADE* functions, but found it here:
https://knowledge.autodesk.com/support/autocad-map-3d/getting-started/caas/simplecontent/content/map-3d-documentation.html
Cheers
jason.cyr13
2017-08-08, 01:15 PM
No worries, BlackBox. I'll bookmark that page and have a look into it.
Thanks!
Bruno.Valsecchi
2018-08-31, 09:43 AM
Hi Jason,
Perhaps a start with this:
Load "Sel_By_OD.lsp" ; run it and select ONE object for model (for you select polyline)
In dialog box, choice for "Données d'objets" the field "lot", for "Valeur du champ" keep the emptie field (if "lot" have not value: i make this for testing) and select "=" for logic operator.
Then routine grip all objects with corresponding at filter.
You can copy-paste in command line this code for put increment value in field "lot"
((lambda ( / js n ent)
(setq js (ssget "_I"))
(cond
(js
(repeat (setq n (sslength js))
(setq ent (ssname js (setq n (1- n))))
(ade_odsetfield ent "test_project" "lot" 0 (itoa (1+ n)))
)
)
)
))
Powered by vBulletin® Version 4.2.5 Copyright © 2025 vBulletin Solutions Inc. All rights reserved.