这可能会让你朝着正确的方向前进
- ;Get the File Path
- (setq fp (getfiled "Select XML File:" "" "xml" 16))
- ;Get the XML DOMDocument Object
- (setq XML (vlax-create-object "MSXML.DOMDocument"))
- ;Load the XML File
- (setq is_loaded (vlax-invoke-method XML 'load fp))
- ;Get the Coordinates Selection
- (setq coords-sel (vlax-invoke-method XML 'getElementsByTagName "coordinates"))
- ;Get the Coords Element
- (setq coords-Element (vlax-get-property coords-sel 'Item 0))
- ;Get the coords
- (setq coords (vlax-get-property (vlax-get-property coords-element 'nodetypedvalue) 'value))
我希望这有帮助
当做
hippe013
P、 美国可能需要在GetField函数中用“kml”替换“xml”。 |