AutoCAD Architecture Forum
Welcome to Autodesk’s AutoCAD Architecture Forums. Share your knowledge, ask questions, and explore popular AutoCAD Architecture topics.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Scheduling Structural Member start x,y,z and end x,y,z

15 REPLIES 15
Reply
Message 1 of 16
henrikljungberg5467
634 Views, 15 Replies

Scheduling Structural Member start x,y,z and end x,y,z

Is it possible to schedule properties that are not part of custom property definition sets but actual properties for the object?
In this particular case we are scheduling rock bolts and want to include the bolts start x,y,z and end x,y,z. For Structural Members, as this is, the properties we want to extract to a schedule are located under the Design tab > Location > Start Point x,y,z and End Point x,y,z.

Regards Henrik Ljungberg
15 REPLIES 15
Message 2 of 16
Anonymous
in reply to: henrikljungberg5467

Check out this thread I asked a similar thing a few years back.

http://discussion.autodesk.com/forums/thread.jspa?messageID=5498995

It involves some VBA script which is in most part way beyond my expertise.

to make it work you will have to update the application version to correspond to the one you are using.

Set app = GetObject(,"AutoCAD.Application.17")
Set aec = app.GetInterfaceObject("AecX.AecBaseApplication.5.5")

there's another thread somewhere on how to find out what version you are using.
Message 3 of 16

Hey!

The link you directed me to was very helpful.
I found that you can isolate the x,y,z within the field dialog (at least in 2008 and 2010). So I simply made manual property definitions for the x,y and z´s for the start and end points. And voila, I can now schedule every bolt with absolute coordinates for each instance! With no involvment of VBA or any other fancy magic stuff.

Thank you so much for the reply this will be very useful in our project.
Regards Henrik Ljungberg
Message 4 of 16
Anonymous
in reply to: henrikljungberg5467

Hi,

Even I had the sane thought, but if i have say few thousands of bolts i will need to attach every bolt individually the fields.

Manual property definition adds fields only to individual Object type.

In that case I will have to use VB Script code.

Any suggestions!
Message 5 of 16
Anonymous
in reply to: henrikljungberg5467

Hi again,
Something just struck me;

In AutoCAD 2008, AutoCAD Architecture 2008 onward there is command called DATAEXTRACTION which enable to extract properties of elements to a table into the drawing ot to external files like; .xls, .csv, .mdb, .txt,

In 2008 the end & start properties for structural elements are not included. But i have heard in 2010 version they can be listed. If you have a copy of 2010 you can try extracting them. Unfortunatly I donot have a copy to check it out.

Please let me know if it works out.

This command is very powerful it keeps a track of previous data extracted & synchronize with it.

Regards,
Raghavendra Bhat
Message 6 of 16

Hi Raghavendra,
the dataextraction didn´t (per default) add any new useful fields in 2010. So I do think the eaiest way would be to add the custom property set to all bolts.

I didn´t quite get why you thought it was such a hassle to do so? You just make the custom property set and select all the structural members and add it to them all at once. The cool thing is then that we can use the dataextraction command or the Surveyor plugin within NavisWorks to make xls or csv schedules with the data that we want.

Regards Henrik Ljungberg

By the way, did you know that we are actually working on the same project?
Message 7 of 16
Anonymous
in reply to: henrikljungberg5467

Sorry for the late reply,


Actually i had tried using the Custom Property set but the results are not satisfying

When i insert a field for the manually created custom property set definition it attaches the field for a specific selected structural member.
When the same property set is attached to another structural member it displays the same coordinates as that of the one selected to attach the field property.
any suggestions!

Regards,
Raghavendra Bhat

----------------------

Regarding working on same project, I actually had not noticed thanks for informing me.
Message 8 of 16

Hi,
I noticed this also so I tried another approach that involved som vbscript within the Custom Property Set and it actually seems to work now.
I will send it to you so you can have a look.

Regards Henrik Ljungberg
Message 9 of 16
Anonymous
in reply to: henrikljungberg5467

Sorry, I've been busy.

Try the following

RESULT="--"
On Error Resume Next
Set app = GetObject(,"AutoCAD.Application")
Set aec = app.GetInterfaceObject("[aecBaseVer]")
aec.Init app
Set util = aec.ActiveDocument.Utility
Set beam = app.ActiveDocument.ObjectIDToObject([ObjectID])
pt1 = util.ConvertToVariantArray(beam.StartPoint)
RESULT = pt1(0)

This calculated the start x value change the pt1(0) to pt1(1) and pt1(2) for y and z values

Use this for end values

RESULT="--"
On Error Resume Next
Set app = GetObject(,"AutoCAD.Application")
Set aec = app.GetInterfaceObject("[aecBaseVer]")
aec.Init app
Set util = aec.ActiveDocument.Utility
Set beam = app.ActiveDocument.ObjectIDToObject([ObjectID])
pt1 = util.ConvertToVariantArray(beam.EndPoint)
RESULT = pt1(0)


[aecBaseVer] being a separate formula I set up ascertain the correct version of ACA.

Put the following in a seperate formula called [aecbasever]

Set acadApp = GetObject(,"AutoCAD.Application")
'ACADVER values:
'ADT2004 = "16.0"
'ADT2005 = "16.1s (LMS Tech)"
'ADT2006 = "16.2s (LMS Tech)"
'ADT2007 = "17.0s (LMS Tech)"
'ADT2009 = "17.2s (LMS Tech)"
acadVerString = acadApp.ActiveDocument.GetVariable( "ACADVER" )
'Set ADT Schedule application string, based on version running:
Select Case acadVerString
Case "16.0"
aecBaseVer = "AecX.AecBaseApplication.4"
Case "16.1s (LMS Tech)"
aecBaseVer = "AecX.AecBaseApplication.4.5"
Case "16.2s (LMS Tech)"
aecBaseVer = "AecX.AecBaseApplication.4.7"
Case "17.0s (LMS Tech)"
aecBaseVer = "AecX.AecBaseApplication.5.0"
Case "17.2s (LMS Tech)"
aecBaseVer = "AecX.AecBaseApplication.5.7"
Case "18.0s (LMS Tech)"
aecBaseVer = "AecX.AecBaseApplication.6.0"
Case Else
aecBaseVer = "Unknown"
End Select

If "aecBaseVer" = "Unknown"Then
RESULT = "--"
Else RESULT = aecBaseVer
End If


This saves you a heck of a lot of leg work if you need to use the formula as far back as 2007 release.



I hope you can figure out the above. I used it to create a tag for structural beams and such that returned the beam elevation and pitch.

Good luck.
Message 10 of 16

Have you been able to make that work in 2010? The ConvertToVariantArray function was not working for me in 2010. I have not had any replies to my post over in the Customization Discussion Group:
http://discussion.autodesk.com/forums/thread.jspa?threadID=751597

David Koch
AutoCAD Architecture and Revit User
Blog | LinkedIn
EESignature

Message 11 of 16
Anonymous
in reply to: henrikljungberg5467

It works fine. I've upgraded the aecbasever to include 2010.

It's not included within the description at the top but it's included in the code. it version 18.0.

If you're still having issues, I can post a file with the start and end values to look at. I haven't posted previously because there's a lot of office content associated with the schedule and I haven't had time to strip it down.
Message 12 of 16
Anonymous
in reply to: henrikljungberg5467

Hello Kevin,

I have tried using the two separate VB Script that you had provided but there were no outputs at my end.

I have attached a sample DWG file within a Zip folder "Bolts Coordinates" in ADT 2007 format which has the PSD defined.

The first second code "aecbasever" that extracts the version works fine but the second one dose not show any sample result.

Can you please help me figure out where exactly I am going wrong!

Regards,
Raghavendra Bhat
Message 13 of 16
Anonymous
in reply to: henrikljungberg5467

The code is fine, all you need to do is open the xstart formula and doubleclick the 'fields' that are required ([ObjectID] and [aecbasever]) from the 'insert property definition' section at the bottom. This will associate the formula with the fields.

Sorry for the delay, I've been working on other projects and have been on vacation.

Hope this helps.

K
Message 14 of 16
Anonymous
in reply to: henrikljungberg5467

Hello Kevin,

The code is working fine in ACA 2008, and is helping us a lot.Thank you.

The points extracted are from WCS. now that we require it from current UCS.
We have tried using TranslateCoordinates method, but it is not working.We have modified the code and added the following please suggest corrections:
--------------------------------------------------------
RESULT="--"
On Error Resume Next
Set app = GetObject(,"AutoCAD.Application")
Set aec = app.GetInterfaceObject("[aecbasever]")
aec.Init app
Set util = aec.ActiveDocument.Utility
Set beam = app.ActiveDocument.ObjectIDToObject([ObjectID])

pt1 = util.ConvertToVariantArray(beam.StartPoint)

pt2=util.TranslateCoordinates( pt1, acWorld, acUCS, False)

RESULT = pt2(0)

---------------------------------------------------
Message 15 of 16
Anonymous
in reply to: henrikljungberg5467

I'm afraid I can't help you. Code isn't really my strong point.

I'm glad the existing formula is working well for you though.

Hope you find a solution.

K
Message 16 of 16
Anonymous
in reply to: henrikljungberg5467

Thats Ok Kevin,

Actually with the help of my colleague we developed a VB code which transforms the WCS coordinates to UCS coordinates. Now its working well.

Many thanks to Sandip for developing this code, without which this would be lot more difficult

If you need to see the code please let me know.

Regards,
Raghavendra Bhat

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

Post to forums  

Autodesk Design & Make Report

”Boost