×
INTELLIGENT WORK FORUMS
FOR ENGINEERING PROFESSIONALS

Log In

Come Join Us!

Are you an
Engineering professional?
Join Eng-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Eng-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Jobs

UG NX and VB.NET
5

UG NX and VB.NET

UG NX and VB.NET

(OP)
I am not a UG user currently but the company is going to move onto NX soon. I was told by a sales rep in July 2003 that this coming Oct UG would announce a full API set that will work with VB.Net. Has anyone else heard anything to this effect. I am skeptical since UG still supports UNIX and thus cross-platform usage issues come up.

Thanks

Guy Edkins
Managing Partner
Delta Group Ltd

gedkins@deltagl.com
www.deltagl.com

RE: UG NX and VB.NET

UG NX3 is suppossed to have a VB.net interface on Windows platforms only.

"Wildfires are dangerous, hard to control, and economically catastrophic."

Ben Loosli
CAD/CAM System Analyst
Ingersoll-Rand

RE: UG NX and VB.NET

October 2004, the last I heard.

"Wildfires are dangerous, hard to control, and economically catastrophic."

Ben Loosli
CAD/CAM System Analyst
Ingersoll-Rand

RE: UG NX and VB.NET

September 15 is the rollout date I heard for UGNX3. I am not a programmer, and know very little about vb.net or any other language of programming, but I do know that what was formerly known as a macro, will now be known as a journal, and will be formatted in vb. The script is able to be cut and pasted into vb.NET code. Ben is right, as far as I know, this is all only available on Windows.

-Derek
DL Engineering Services

specializing in CAD Design Consultation Services
www.dl-engineering.com

RE: UG NX and VB.NET

I need same thing, I need something like UG .NET library. I try to use open C API for UG, and called one function from VB, but it did not work well. How can I get this .NET package so I'll be able to use it with VB.NET?

tnx

RE: UG NX and VB.NET

Pay the Bucks. The .net interface is an additional cost module, even if you currently have UG/Open API.

"Wildfires are dangerous, hard to control, and economically catastrophic."

Ben Loosli
CAD/CAM System Analyst
Ingersoll-Rand

RE: UG NX and VB.NET

So looslib then you should probably know, what does this function (UF_ATTR_ask_part_attrs_in_file) do? I just need to rewrite it to VB that's it.
I need to extract part attributes from PRT file somehow can you help, pls? I'm trying to do that for 3 months, and w/o success.

Tnx

RE: UG NX and VB.NET

(OP)
Mirdous,

If you are looking to get the standard properties stored in the header of the NX files you should be able to do this using dsofile.dll (free from Microsoft, just Google it) and then have VB/VBA read or write the custom properties you are after. I use it all the time. Sounds like UG better look harder at there competition (Solidworks) as the API libraries are free with the core product. Buy the product and start programming. No a la carte charges!

Guy Edkins
Managing Partner
Delta Group Ltd

gedkins@deltagl.com
www.deltagl.com

RE: UG NX and VB.NET

Tnx a lot man, but I'm not looking for document file attributes. But atributes which you can specify in unigraphics File->Properties->Attributes (those are only string type).

RE: UG NX and VB.NET

(OP)
Mirdous,

When I saw a demo of NX the engineer created a property as noted above and then opened a windows explorer and right clicked and looked at the properties and there was the newly created property. Am I missing something?

Guy

Guy Edkins
Managing Partner
Delta Group Ltd

gedkins@deltagl.com
www.deltagl.com

RE: UG NX and VB.NET

Well I dont know maybe it was different version, i'm using NX2. But those attrs u are talking about are not the one I'm looking for.

RE: UG NX and VB.NET

I tried creating File/Properties/Atributes and they do not show up in windows explorer under file properties/ custom. Is there a switch somewhere I'm missing?

And they charge for the VB module? Man, UG is ripping their customers for everything they have. You get a free VB and C+ api with Solidworks. And it's macro language is vb so really you don't even need a copy of VB unless you want to run the program outside Solidworks.

Jason Capriotti
Smith & Nephew, Inc.

RE: UG NX and VB.NET

UG atributes are stored as string values internal to UG. There is no passing of these values to the Windows file property settings.

The UF command is a C call to get the internal part attributes. If you know how to wrap a C call into your VB program, you are set to go. UG on Windows requires VC6 to compile the code.

"Wildfires are dangerous, hard to control, and economically catastrophic."

Ben Loosli
CAD/CAM System Analyst
Ingersoll-Rand

RE: UG NX and VB.NET

Ben, this is in the help which makes it sound like you can.
You can search the help to read the whole thing.

-------------------------------
Creating, Editing, and Viewing Part Attributes

You can create, edit, and view part attributes using a part's Properties pop-up menu on Windows Explorer. This allows you to create, view, modify, and delete part attributes without fully loading a part. You can also cut and copy part attributes from Windows Explorer and paste them to:

the Attributes page in an active Unigraphics NX session (File->Properties->Attributes)

another Unigraphics NX part

a text editor

This feature does not require an active Unigraphics NX session and works only for parts created in Unigraphics NX2 and later.

Jason Capriotti
Smith & Nephew, Inc.

RE: UG NX and VB.NET

Well now that you mension it, there is a 4th tab on my explorer properties dialog for UG parts, called "Custom". There are a bunch of attributes on there to fill out, but I cannot figure out how to customize them. BTW, I'm running WXPSP2, and have installed NX3. Not sure if that has anything to do with this page showing up.

-Derek
DL Engineering Services

specializing in CAD Design Consultation Services
www.dl-engineering.com

RE: UG NX and VB.NET

"Custom" is there for any windows file. It's what we used for Solidworks. I don't believe you can customize the list but you can type in any name you want.

Win2000
UG NX 2.0.2.2

Jason Capriotti
Smith & Nephew, Inc.

RE: UG NX and VB.NET

Gildashard

I do not have anything like you described (part's Properties pop-up menu on Windows Explorer) I just cant find it did you install some new features to support it?
I do have only standard winxp file properties.

To looslib I tried to wrapp open API C func to dll and call it from VB but I cannot call it more than once because second time i get no result from that function.

RE: UG NX and VB.NET

It's the standard windows file properties dialogue. Right click a file and select properties. Then there is a custom tab.

Jason Capriotti
Smith & Nephew, Inc.

RE: UG NX and VB.NET

(OP)
Mirdous,

If I am correct about the file properties then the DSOFile.dll is the easy way to do the reading and writing of custom props. I do it all the time in Solidworks. I can mass release about 150 drawings in about 8 seconds. It all reports up to the revision block on the face of the drawing too. Hopefully I will be able to do the same in UG NX3 with VB.NET.


Guy Edkins
Managing Partner
Delta Group Ltd

gedkins@deltagl.com
www.deltagl.com

RE: UG NX and VB.NET

Jason,

Maybe your SolidWorks spoiled PRT files of having Custom Properties under Windows Explorer?

Henry

RE: UG NX and VB.NET

Solidworks has never been on this PC. New job that uses UG, my old job used Solidworks.

Tough transition mind ya, but I'm getting there.

Jason Capriotti
Smith & Nephew, Inc.

RE: UG NX and VB.NET

5
The following command adds a fifth tab titled "Attributes" to the windows explorer properties page for .prt files.

regsvr32 "%ugii_base_dir%"\ugii\ugpropext.dll

Windows Explorer must be restarted - (logoff/login)

Part file(s) must be saved in NX2.

Uninstalling, reinstalling, relocating, or upgrading NX will not ungregister the dll. (use regsvr32 /u ...)

RE: UG NX and VB.NET

jpetach,

Thats on hell of fine tip.
Now does anyone know is it possible to use DSOFile.dll to read-write these attributes?

Henry

RE: UG NX and VB.NET

jpetach, thanks for the info - I think it's worth a star.

RE: UG NX and VB.NET

Joe,
Where is this command, ugpropext.dll, documented?

Are you sharing UGS secret files that only employees know how they function? There are a few in the ugii directory if you are willing to experiment with them.


"Wildfires are dangerous, hard to control, and economically catastrophic."

Ben Loosli
CAD/CAM System Analyst
Ingersoll-Rand

RE: UG NX and VB.NET

(OP)
Henry,

As I suggested earlier in the thread as long as the UG file format adheres to the MS header format then DSOfile will read/write the properties very nicely. It is amazing how fast it can do it too. I regularly write 400 to 500 files in just a few seconds. Keep in mind the files cannot be open by any other process if you are attempting to write via DSO. You can do error checking for that however or batch it for an off hours process.

Guy Edkins
Managing Partner
Delta Group Ltd

gedkins@deltagl.com
www.deltagl.com

RE: UG NX and VB.NET

(OP)
Folks,

It appears that Ben was correct in his original statement about UG Attributes being internal to UG and not passed to the windows header data. I set up my machine with UG and enabled the custom prop extension and then ran my standard DSO tool against a UG file and no luck, it does not "see" the UG "Attributes". So my automation tools won't work for now (running 2.0.2.2). With the advent of 3.0 we may see an improvement in external data management of UG. Oh well, I think got somewhat hoodwinked by the UG sales folks earlier this year with the demo they did.

Guy Edkins
Managing Partner
Delta Group Ltd

gedkins@deltagl.com
www.deltagl.com

RE: UG NX and VB.NET

Ben,

I wish I had "secrets" to tell

The NX2 Beta What's New Guide was the first mention of the part attributes access in Windows explorer.

RE: UG NX and VB.NET

A star for you jpetach.
Cool tip.

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Eng-Tips Forums free from inappropriate posts.
The Eng-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Eng-Tips forums is a member-only feature.

Click Here to join Eng-Tips and talk with other members!


Resources