Hello again
I'm using this command in my code but I'm having some troubles. The command is not documented at all.
I'm using the "_.MAPCREATEFEATUREFROMGEOMETRY" in my code. When I type (command "_.MAPCREATEFEATUREFROMGEOMETRY" sds "" "") in the command line there are no problems. It creats a new feature from the polyline in selection set 'sds'.
But when I implemnt the command inside a autolisp code I get this
Command: (load "maptosdf")
C:MAPTOSDF
Command: MAPTOSDF
...DCL_TEST Cancelled.
Select closed curves to select object(s) within: nilnilKP_Broj
1630/7_.MAPCREATEFEATUREFROMGEOMETRY
Erase the selected object after operating [Yes/No]:
Invalid option keyword.
; error: Function cancelled
Erase the selected object after operating [Yes/No]:
Message #0: Cannot convert one of the selected objects.
Geometry
Message code: 1.
Message #1: Cannot convert one of the selected objects.
Geometry
Message code: 1.
Message #2: Cannot convert one of the selected objects.
(defun C:listman ()(setq sds(ssadd))(ssadd a sds)(command "_.MAPCREATEFEATUREFROMGEOMETRY" sds "" "" ))[code]So thats basicaly my code. And it's part of a while loop together with some other functions.
(C:INPUT)
(C:SELPOL)
(C:SSTOLIST)
(while (/= sslist nil)
(setq guidbr (dos_guidgen))
(setq a (car sslist))
(setq b (cdr sslist))
(C:swc)
(C:test)
(princ)
(C:listman)
(C:fileh)
(setq sslist b)
)
[/code]
It selects all the polylines and adds them to a list. It promts for user input for some variables that are the same for all parcels and need to be saved only once. Than it takes one parcel at a time from the list. Determines the parcel number inside parcel and saves it to a variable. Generates a GUID number. Than it should create a new feature form object. And finaly print all the variables that it gathert vie file_handle.
You are still not providing much code. The forum can only guess what all your subs do.
For debugging purposes add (print a) before (command "_.MAPCREATEFEATUREFROMGEOMETRY" ...).
BTW: I strongly advise revising your coding style.
I konw my code doesn't look nice. I'm still pretty new to autolisp and I'm learning as I code. I appreciate your help very much. I managed to solve the problem by adding "(sssetfirst nil nil)" at the top of the code.
Now I have all the data that I need saved to a txt file. I paste the data to excel and have nice organized rows and columns as they should look. The problem is I can't copy paste them into the Map 3D data table. That should be the final step.