Jump to content

Automatic sorting of lines by LandXML Attributes


Recommended Posts

Posted

Hi all, 

I'm using Autodesk Civil 3D Version 2024 and looking for a solution of following issue. I imported polylines from a LandXML file, and want to distribute them automatically to different layer according to the different codes that are imported as LandXMLAttributes (AcDb3dPolyline) PlanFeature::desc. For example if the the PlanFeature::desc of a polyline is 2 it should be moved to the layer "0_BOK". Does one of you have a solution for this issue?

Posted

This is as far as I got, I am sure could find other values by digging more.

 

(setq ent (car (entsel "\nPick object ")))
(setq a (entget (cdr (assoc 360 ent))))
(setq b (entget (cdr (assoc 360 a))))
(setq c (entget (cdr (assoc 360 b))))
(setq props (mapcar 'cdr (vl-remove-if-not '(lambda (x) (= (car x) 309)) c)))

 

("2025-06-17 09:13:03" "Alles.XML" "C:\\\\Users\\\\g45166\\\\Desktop\\\\TOPO\\\\" "2025-06-17 14:47:26" "1.2")

 

Will have another go later, using Bricscad.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...