Message 1 of 16
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Is there a way to use getstring and have a default that will also accept a null string?
For example, if issued the normal way as:
(setq pre (getstring "\nPrefix <C->: "))
Then the normal way is check if the variable pre is null and if it is then set the variable pre to "C-1"
But what I am wanting to do is issue the prompt as:
(setq pre (getstring "\nPrefix: C- "))
Then if the C- is removed the variable pre would be a null string, but if not removed then the variable is filled with "C-"
Is there a way to do that?
Thanks
Civil 3D 2022,
Windows 10 Pro, x64, Nvidia Quadro P1000
Intel Core i9-11900k; 3.50GHz, 32 GB RAM, 500GB WD BLACK M.2
Windows 10 Pro, x64, Nvidia Quadro P1000
Intel Core i9-11900k; 3.50GHz, 32 GB RAM, 500GB WD BLACK M.2
Solved! Go to Solution.