Community
AutoCAD Forum
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Unable to draw dimansion as extracted

5 REPLIES 5
Reply
Message 1 of 6
Anonymous
506 Views, 5 Replies

Unable to draw dimansion as extracted

Hello All,

 

In my current task I need to extract all Dimensions and redraw as it is.

To do so I am extracted all Dimensions  DXF code in excel file and save it and read excel cell with function "read" and draw it using "entmake ".

 

The output is same but for vertical dimension the text direction is change. see attached picture.

To find any dissimilarity in new and old dimension  I checked all property but they all are same, checked DXF code this also same , and checked vlax property they also same.

 

I can't find any dissimilarity in those dimension but still it's look different.

Herewith attached similar code you may check it.

 

(defun removeEntity (lst / returnlst)
  (setq returnlst nil)
  (foreach val lst
    (if	(/= (type (cdr val)) 'ENAME)
      (setq returnlst (append returnlst (list val))
      )
    )
  )
  returnlst
)



(defun c:redim ()
  
  (setq	sel1	(ssget "x" '((0 . "DIMENSION")))
	lstColl	nil
  )
  (if sel1
    (progn
      (repeat (setq n (sslength sel1))
	(setq
	  lstColl
	   (append lstColl
		   (list (vl-prin1-to-string
			   (removeEntity (entget (ssname sel1 (setq n (1- n) ))))
			 )
		   )
	   )
	)
      )
      
      (if sel1 (command "_.Erase" sel1 ""))

      (if lstColl
	(foreach val lstColl
	  (entmake (read val))
	)
      )
    )
  )
)

Capture.PNG

 

5 REPLIES 5
Message 2 of 6
Ajilal.Vijayan
in reply to: Anonymous

'New' looks readable ,  are you saying you need as 'Original' ?

Message 3 of 6
Anonymous
in reply to: Ajilal.Vijayan

Yes It Must be look like Original

Message 4 of 6
Ajilal.Vijayan
in reply to: Anonymous

In that case change the view direction in the dimension style

Also for the entmake function see the DXF code 51 here

Capture.JPG

Message 5 of 6
Anonymous
in reply to: Ajilal.Vijayan

still have same problem
Message 6 of 6
timothy_crouse
in reply to: Anonymous

Have you tried reversing the selection order as you place the dimension?

 

It seems to be a form of a mirror happening.

 

-Tim C.

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Forma Design Contest


Autodesk Design & Make Report