Delphi-PRAXiS

Delphi-PRAXiS (https://www.delphipraxis.net/forum.php)
-   Sonstige Fragen zu Delphi (https://www.delphipraxis.net/19-sonstige-fragen-zu-delphi/)
-   -   Delphi Autocad NULL übergeben (https://www.delphipraxis.net/43699-autocad-null-uebergeben.html)

thomasch 7. Apr 2005 12:10


Autocad NULL übergeben
 
Hallo,
ich möchte in Autocad die Prozedur GetXData aufrufen und muss dazu dieser Prozedur einen "Nullsting" übergeben.

Der VB Syntax lautet:
Code:
myobject.GetXData "", xtypeOut, xdataOut
In Delphi funktioniert:
Delphi-Quellcode:
myobject.GetXData('myapp',xtypeOut,xdataOut);
jedoch nicht:
Delphi-Quellcode:
myobject.GetXData('',xtypeOut,xdataOut);
myobject.GetXData(NULL,xtypeOut,xdataOut);
myobject.GetXData(nil,xtypeOut,xdataOut);

const
myapp=''; // 
myobject.GetXData(myapp,xtypeOut,xdataOut);
Der erste Parameter wird von Delphi als Widestring und von Autocad als String erwartet. Dabei bewirkt ein "NULL String" (O-Ton Autocadonlinehilfe) genau die Funktionalität, die ich haben möchte.

Thomasch

Bernhard Geyer 7. Apr 2005 12:30

Re: Autocad NULL übergeben
 
Schau mal in der Delphi-Hilfe nach EmptyParam

thomasch 7. Apr 2005 13:31

Re: Autocad NULL übergeben
 
Zitat:

Zitat von Bernhard Geyer
Schau mal in der Delphi-Hilfe nach EmptyParam

Der Tipp ist gut und hilft mit bei einer anderen Sache - nur bekomme ich in dem Fall einen Fehler "-2147352572: Parameter nicht gefunden".

Thomasch

thomasch 8. Apr 2005 08:32

Re: Autocad NULL übergeben
 
Ich hab es endlich alleine gefunden. Mit:
Delphi-Quellcode:
myentity.GetXData(#0,xtypeOut,xdataOut);
geht es :-D

Thomasch


Alle Zeitangaben in WEZ +1. Es ist jetzt 09:17 Uhr.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024-2025 by Thomas Breitkreuz