CAD Forum - Database of tips, tricks and utilities for AutoCAD, Inventor and other Autodesk products [www.cadforum.cz]
CZ | EN | DE
Login or
registration
  Visitors: 8929
RSS channel - CAD tips RSS tips
RSS discussions

Discussion Discussion forum

 

HelpCAD discussion

 
CAD Forum - Homepage CAD discussion forum - ask any CAD-related questions here, share your CAD knowledge on AutoCAD, Inventor, Revit and other Autodesk software with your peers from all over the world. To start a new topic, choose an appropriate forum.

Please abide by the rules of this forum.

How to post questions: register or login, go to the specific forum and click the NEW TOPIC button.
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Topic ClosedScript file for colored solid square

 Post Reply Post Reply
Author
cem35 View Drop Down
Newbie
Newbie


Joined: 02.Sep.2020
Location: Turkey
Using: AutoCAD2021
Status: Offline
Points: 3
Direct Link To This Post Topic: Script file for colored solid square
    Posted: 02.Sep.2020 at 21:23
Hi,  I need some help.  Iam using AutoCAD2021, 
I want to plot a square and filled by a color to a specific coordinate of x and y using a script file (.scr).
my input is x,y, a (one side), filled by a color, let us say red,blue ... whichever I want. How can I do it by sorting Script file  in autoCAd. Thanks


Edited by cem35 - 02.Sep.2020 at 21:24
Back to Top
Vladimir Michl View Drop Down
Moderator Group
Moderator Group

Arkance Systems CZ

Joined: 26.Jul.2007
Location: Czech Republic
Using: Autodesk software
Status: Offline
Points: 2015
Direct Link To This Post Posted: 04.Sep.2020 at 09:01
You can either use the SOLID command to draw filled squares. Or just draw the RECTANGLE and then use HATCH Last to fill it.

Vladimir Michl (moderator)
Arkance Systems - arkance-systems.cz - Autodesk reseller
Back to Top
rebellio View Drop Down
Senior Member
Senior Member


Joined: 04.Mar.2009
Location: Netherlands
Using: Autocad 2018
Status: Offline
Points: 125
Direct Link To This Post Posted: 04.Sep.2020 at 12:58
Something Like This?
It is in lisp, load the lisp via appload command and type RSH and type coordinates or pick 2 points.....
Regards


Edited by rebellio - 04.Sep.2020 at 16:22
Back to Top
cem35 View Drop Down
Newbie
Newbie


Joined: 02.Sep.2020
Location: Turkey
Using: AutoCAD2021
Status: Offline
Points: 3
Direct Link To This Post Posted: 09.Sep.2020 at 12:47
Thank you for answer, Could you give an example to be written in .scr flie.
Forexample: _RECTANGLE x1,y1 x2,y2...... 

Because I have 9000 number of  coordinates to apply it. 
same square size  but different color


Edited by cem35 - 09.Sep.2020 at 12:49
Back to Top
rebellio View Drop Down
Senior Member
Senior Member


Joined: 04.Mar.2009
Location: Netherlands
Using: Autocad 2018
Status: Offline
Points: 125
Direct Link To This Post Posted: 18.Sep.2020 at 13:41
Hi,

Can you explain something more about the purpose of those rectangles?
Perhaps you can do a workaround with the array command..... 

i am afraid that it is not doable in script,

Regards
Back to Top
Kent Cooper View Drop Down
Senior Member
Senior Member


Joined: 12.Mar.2013
Location: United States
Using: AutoCAD2020, 2023
Status: Offline
Points: 616
Direct Link To This Post Posted: 29.Sep.2020 at 20:14
Originally posted by cem35 cem35 wrote:

... I have 9000 number of  coordinates to apply it. 
same square size  but different color

In what form do you have the 9000 locations?  And the colors to give them?  A spreadsheet file?  A text file of some kind?  Something else?

If they are in a file of some kind that AutoLisp can open and read, then an AutoLisp routine could probably do what you need, but as far as I know not a Script.  (Some people use "script" generically, to include things like AutoLisp routines, but the word has a specific, and different, meaning in AutoCAD.)
Back to Top

Related CAD tips:


 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down



This page was generated in 0,383 seconds.