Jump to content

Using attributes to define block placement


Recommended Posts

Posted

I'm importing point shapefiles into Map3D, that have attributes defining the BLOCKNAME, BLOCK ROTATION and BLOCK SIZE.  I can use the mapimport dialog box to create the blocks using the BLOCKNAME, but is there a way to get it to use the rotation and size information too?

Really appreciate any help/advice.

Posted

For the shapefiles we use

tbl1 (car (ade_odgettables EN))        ;First_Table_Assigned_to_Object where EN is entity name

(car (ade_odgettables EN))        ;First_Table_Assigned_to_Object

(ade_odgetfield EN TBL1 "ELEV" 0)       ;the object data for the elevation is ELEV

There's no standards that I know of and our GIS folk change both the attributes and their names from time to time forcing me to modify my code.  You're going to have to figure out the table and attribute structure to code it yourself.  Lot of cool stuff you can do with it once you figure it out.

Posted

Thanks for your response; I figured there would be a way in lisp...I'm just not up to the challenge of writing the script! ☹️

I understand the GIS tables and how all my attributes are defined and what I need to use to get my outcome, but not how to program it.  I will have to get help with that... thanks again.

Posted

A slightly different way use this at times with attributes, you shouldbe able to get the "count" of the objdata fields you can then just loop through and create a variable for each field getting its name and value. 

 

Need a dwg to check.

 

For normal block its get-attributes then a foreach to open each attribute then you can get all the stuff inside, insertpoint, text rotation etc.

 

not tested

(setq EN (car (entsel "Pick object data"))

(setq tbl1 (car (ade_odgettables EN))        ;First_Table_Assigned_to_Object where EN is entity name

(foreach fld (car (ade_odgettables EN))

(vlax-dump-object fld)

)

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...