@komondormrex wrote:
... wblock's generated dxf will be somehow a block and i am aware when inserted it will be inserted with that base point. but opened independently it will retain the source origin of CS. correct me if i went wrong.
It won't be a Block, but a drawing interchange file. It will constitute or become the definition of a Block only if and when it is Inserted in some other drawing, in which case its internal Coordinate System will be irrelevant, so does it matter?
Yes, the Coordinate System 0,0 will remain where it was in relation to the exported pieces. But back to your description: "User then point origin point he wants to be an origin point of CS of created dwg document to which routine copies selected entities." I don't see how that would change it, either. By what methods, exactly, are you picturing the User would pick the origin point and the routine would copy the things to a new drawing?
Also, "Then newly created document saved and opened in another autocad document window to be saved as dxf version 2004." If you are picturing that as being done within the same routine that exported things to a new drawing, that won't be possible, because an AutoLisp routine cannot start in one drawing and continue in another. It would need to be done manually by the User, or a follow-up separate routine would need to be written, to be called for when in the new drawing.
@Hans_Knol : If it's necessary to actually change the 0,0 origin in the exported drawing [does that matter to the CNC machine or something?], I suspect it will require either:
A. Moving the selected objects from the desired origin to 0,0 in the source drawing before exporting them; or
B. Defining the selected objects into a Block first, using the desired origin location as the base point, and then WBLOCKing out that Block definition [not the selected objects independent of it] to a new drawing/dxf file, in which case in the resulting new drawing the 0,0 origin will be where the selected base point was in the source drawing.
Kent Cooper, AIA