Seems simple, I know, but I'm having trouble consistently drawing rectangles. I draft a lot of mechanical piping (specifically in Civil 3D because we also do pipelines) and I typically use rectangles to draft the pipe rather than two lines so I can easily move, adjust lengths, etc.
I have always dropped in a flange, or something with the pipe OD, and created a rectangle based on that. I use Object Snap Tracking to track the opposite side of the flange and manually enter my pipe length through the keyboard. 99/100 times it'll draw the rectangle with the correct OD and length, but every once in a while some setting changes and it instead draws the pipe to have the diagonal length match my keyboard entry. Pictures below for reference.
My question is - what setting causes it to do this? I've searched far and wide for the last couple years, intermittently as it occurs, to try to find a solution. Eventually it fixes itself and I go on with my life, but it still bugs me.
But there's nothing out there that it could snap to. When I say it happens intermittently, I mean it'll happen consistently for a week or more until it randomly reverts back. Then a month or so later it'll start again. Which leads me to believe it's some setting that gets reset or somehow modified.
Hi,
besides of what @pendean already mentioned with the incorrect base-point for tracking I would like to ask:
>> I draft a lot of mechanical piping (specifically in Civil 3D
>> because we also do pipelines)
When you have Civil 3D, why then drawing pipes with rectangles, why don't you use Civil 3D functionality to draw pipes?
Even without Civil 3D I would never draw rectangles (at least because I don't have a length of objects and I can't mamipulate lenth and width easily) instead I would:
- alfred -
Civil 3D's pipes are really designed for what we do, to my knowledge. A single drawing could have thousands of short pipe sections to build pipe settings. We use alignments for long sections of buried pipe (i.e. pipelines) and rectangles for short (i.e. 6" to 5') pipes within settings.
I understand the _MLINE and dynamic blocks, but they're honestly more trouble than my traditional method of using rectangles. Each take multiple key entries to define the width (i.e. diameter) of the pipe - a step that isn't necessary when I snap to adjoining pipe or fittings.
What I'm really after is how to make the rectangle command do what I want it to.
Scot-65
A gift of extraordinary Common Sense does not require an Acronym Suffix to be added to my given name.
I am not one of the robots you're looking for
Sorry about the delay, I missed your post.
Here is the code.
(vl-load-com) ;;draws a polyline rectangle to the right of the selected points (defun c:rect (/ *error* osm c_doc p_dist pt1 pt2 p_ang pt3 pt4) (defun *error* ( msg ) (if osm (setvar 'osmode osm)) (if (and c_doc (= 8 (logand 8 (getvar 'UNDOCTL)))) (vla-endundomark c_doc)) (if (not (wcmatch (strcase msg) "*BREAK*,*CANCEL*,*EXIT*")) (princ (strcat "\nOops an Error : " msg " occurred."))) (princ) );_end_local_*error*_defun (if (/= (getvar 'osmode) 1) (progn (setq osm (getvar 'osmode)) (setvar 'osmode 1)));save current osnap mode and set to end if not already end (setq c_doc (vla-get-activedocument (vlax-get-acad-object))) (initget (+ 1 2 4));No null,zero or negatives (setq p_dist (getreal "\nEnter Rectangle Length : "));get length as decimal units (if (and c_doc (= 8 (logand 8 (getvar 'UNDOCTL)))) (vla-endundomark c_doc)) (vla-startundomark c_doc) (initget 1);no nulls (setq pt1 (getpoint "\nSelect Top Left Corner : ") pt2 (getpoint "\nSelect Botton Left Corner : ") p_ang (+ (angle pt1 pt2) (* pi 0.5)) pt3 (polar pt2 p_ang p_dist) pt4 (polar pt1 p_ang p_dist) );end_setq (command "_pline" pt1 pt2 pt3 pt4 "c");draws lwpolyline on current layer (if osm (setvar 'osmode osm)) (if (= 8 (logand 8 (getvar 'UNDOCTL))) (vla-endundomark c_doc)) );end_defun
I am not one of the robots you're looking for
Can't find what you're looking for? Ask the community or share your knowledge.