Tuesday, February 07, 2012
Solid Edge Options - Draft
Last Post 06 Jul 2010 08:58 PM by Jason Newell. 1 Replies.
AddThis - Bookmarking and Sharing Button Printer Friendly
Sort:
PrevPrev NextNext
You are not authorized to post a reply.
Author Messages
LucaUser is Offline
New Member
New Member
Posts:5

--
05 Jul 2010 05:18 AM  

Hi guys!

When you open a draft file, you can set to Solid Edge Options panel (options for active document):

- Edge Display: Visible edge style, Tangent edge style, Hidden edge style, ecc....

- Dimension style: style for each type of dimension...

 

How can I know this information by API?

Jason NewellUser is Offline
Site Owner
Advanced Member
Advanced Member
Posts:895
Avatar

--
06 Jul 2010 08:58 PM  

I haven't looked through all of the results but you may try the GetGlobalParameter() method.  See example below.

using System;
using System.Reflection;
using System.Runtime.InteropServices;

namespace SETest
{
    class Program
    {
        static void Main(string[] args)
        {
            
            Type t = typeof(SolidEdgeFramework.ApplicationGlobalConstants);
            FieldInfo[] fields =  t.GetFields(BindingFlags.Public | BindingFlags.Static);

            SolidEdgeFramework.Application application = (SolidEdgeFramework.Application)Marshal.GetActiveObject("SolidEdge.Application");
            
            foreach (FieldInfo field in fields)
            {
                object value = null;
                application.GetGlobalParameter((SolidEdgeFramework.ApplicationGlobalConstants)field.GetRawConstantValue(), ref value);

                string sValue = value == null ? "" : value.ToString();
                Console.WriteLine(String.Format("{0} = {1}", field.Name, sValue));
            }
        }
    }
}
Jason Newell
Applications Architect
www.jasonnewell.net
You are not authorized to post a reply.

Active Forums 4.2
Copyright © 2011 JasonNewell.NET