Print Page | Close Window

Using file path in macros

Printed From: CAD Forum
Category: EN
Forum Name: AutoCAD
Forum Description: Discussion about AutoCAD and AutoCAD LT, viewers, DWG and DWF formats, Design Review, AutoCAD 360, add-ons
URL: https://www.cadforum.cz/forum_en/forum_posts.asp?TID=7730
Printed Date: 31.May.2026 at 23:30


Topic: Using file path in macros
Posted By: archdake
Subject: Using file path in macros
Date Posted: 26.Apr.2012 at 10:13

Hello!

I usually setup custom command macros in palettes. I have a problem with the syntax when it's time to enter a file path. Let's assume the file name is drawing1.dwg and it's in c:\ folder. If I enter c:\drawing1.dwg in the command macro and I execute it, I get

c:

at the command line which I assume it is because autocad interprets \ as waiting for user input.

Any ideas?




Replies:
Posted By: Lexxx
Date Posted: 27.Apr.2012 at 10:18
For pathnames us foreward slash (/) not the backslash (\)
 
Lex


Posted By: archdake
Date Posted: 27.Apr.2012 at 11:49

Thank you so much!


Thumbs up!!


It's funny how our brain gets stuck. After so many macros I mixed my slashes up, he he 




Print Page | Close Window