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

cannot remove attributes

10 REPLIES 10
SOLVED
Reply
Message 1 of 11
mkrones
3948 Views, 10 Replies

cannot remove attributes

We collect field survey data using a Trimble handheld GPS datalogger. We export DXF files from Trimble Pathfinder Office (PFO). The logged points are exported as DWG blocks. The blocks appear in the DWG that we create from the exported DXF as points with attributes. We update the appearance using a block of the same name from our library.

 

Everything looks good, but we can't get rid of the attributes. (We need some of those attributes but eventually need the drawing to be cleared of them.) These attributes appear when we double-click a block, but not when we edit the block, so we can't simply delete the attributes from the block.

 

We've tried wblock, writing out all instances of the offending block to a new DWG. The blocks in that new, daughter DWG (all of them are the same) retain their attributes as in the parent drawing. Unfortunately, they lose the annotative characteristic, but that's a manageable problem.

 

We then delete all instances of that block from the parent drawing, purge, audit, and insert the daughter DWG into the parent. The result is that all instances of the block now appear as a point, not annotative, and still with the nonsense attributes.

 

It seems that the block that is exported from PFO to DXF has some inherent properties that we cannot modify. A work-around, which is getting tedious, is to use the PFO DWG as an xref to the parent, and insert the desired block into the parent at the coordinates of each instance of the offending block. 

 

Anyone have any ideas?

10 REPLIES 10
Message 2 of 11
john.vellek
in reply to: mkrones

Hi @mkrones,

 

Perhaps I am misunderstanding but...

 

Can you use BATTMAN to edit the block and remove any attributes that you do not want to rain and then use Sync? You are welcome to attach a sample drawing file and tell me which attributes you don't want. I am happy to explore some options for you.

 

If I missed the intent of your question perhaps you can phrase it differently.

 

 

Please select the Accept as Solution button if my post solves your issue or answers your question.


John Vellek


Join the Autodesk Customer Council - Interact with developers, provide feedback on current and future software releases, and beta test the latest software!

Autodesk Knowledge Network | Autodesk Account | Product Feedback
Message 3 of 11
mkrones
in reply to: john.vellek

BATTMAN does not list the offending block as having attributes.
A portion of the DWG containing several instances of the block is attached.
Michael
Message 4 of 11
john.vellek
in reply to: mkrones

Hi Michael,

 

I don't see an attachment. Make sure to add it through a web browser and not through email.


John Vellek


Join the Autodesk Customer Council - Interact with developers, provide feedback on current and future software releases, and beta test the latest software!

Autodesk Knowledge Network | Autodesk Account | Product Feedback
Message 5 of 11
mkrones
in reply to: john.vellek

Please see the attached DWG. 

Michael

Message 6 of 11
cadffm
in reply to: mkrones

Do you need a statement or one of three solutions?

Short way: Seperate inserts like your example.dwg, use command LAYDEL to delete all objects who reference that layer.

-

PS: It's your block, so you can add an attdef and attsync work

Sebastian

EESignature

Message 7 of 11
Ranjit_Singh1
in reply to: mkrones


@mkrones wrote:

Please see the attached DWG. 

Michael


Hi Michael, try the below routine. It worls on the attached dwg. See screencast.

(defun c:somefunc  (/)
 (mapcar '(lambda (x) (foreach i (vlax-invoke (vlax-ename->vla-object x) 'getattributes) (vla-delete i)))
	 (vl-remove-if 'listp (mapcar 'cadr (ssnamex (ssget '((0 . "INSERT")))))))
 (princ))

Message 8 of 11
john.vellek
in reply to: mkrones

Hi Michael,

 

I exploded one of your blocks. I then used LAYDEL to remove the IR-RCV150 layer and I then purged the file.

 

Does this work for you?

 

 

Please select the Accept as Solution button if my post solves your issue or answers your question.


John Vellek


Join the Autodesk Customer Council - Interact with developers, provide feedback on current and future software releases, and beta test the latest software!

Autodesk Knowledge Network | Autodesk Account | Product Feedback
Message 9 of 11
mkrones
in reply to: Ranjit_Singh1

Ranjit,
Thank you. It appears that your routine will do the job, but I don't know how to create the function that ACAD can call. Can you give me a few pointers on that, or give me the search word that will take me to ACAD instructions?
Michael
Message 10 of 11
mkrones
in reply to: Ranjit_Singh1

Ranjit,
Thank you. It appears that your routine will do the job, but I don't know how to create the function that ACAD can call. Can you give me a few pointers on that, or give me the search word that will take me to ACAD instructions?
Michael
Message 11 of 11
Ranjit_Singh1
in reply to: mkrones

Michael, follow below steps.

 

  1. Double click in the code window (kind of grey window above my screencast) and it should select all my code (you will see it highlighted).
  2. Hit CTRL+C to copy the code.
  3. Start notepad and paste the code in the file.
  4. Save the file as a .lsp file (note that when you save, select "all files" in the 'save as type' option and under filename specify the extension as well, example somefunc.lsp). 
  5. In AutoCAD type "appload". In the Load/Unload application window select the newly created lisp file and select load.
  6. Before closing the Load/Unload application window, click on contents under Startup Suite and add the same file (this will make sure AutoCAD remembers the command when you start AutoCAD next time, so you do not have to appload it again).
  7. Close out of the Load/Unload Application window.

You should be done. Type somefunc at command prompt. See this link and the related topics section in there for more help. Let me know if you run in any issues. Good luck 🙂

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

Post to forums  

Forma Design Contest


AutoCAD Beta